Skip to content

Commit

Permalink
fix(docs): post code freeze small issues (backport #3403) (#3420)
Browse files Browse the repository at this point in the history
This is an automatic backport of pull request #3403 done by
[Mergify](https://mergify.com).


---


<details>
<summary>Mergify commands and options</summary>

<br />

More conditions and actions can be found in the
[documentation](https://docs.mergify.com/).

You can also trigger Mergify actions by commenting on this pull request:

- `@Mergifyio refresh` will re-evaluate the rules
- `@Mergifyio rebase` will rebase this PR on its base branch
- `@Mergifyio update` will merge the base branch into this PR
- `@Mergifyio backport <destination>` will backport this PR on
`<destination>` branch

Additionally, on Mergify [dashboard](https://dashboard.mergify.com) you
can:

- look at your merge queues
- generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com
</details>

Co-authored-by: Eyal Keren <[email protected]>
  • Loading branch information
mergify[bot] and ekeren authored Jul 13, 2023
1 parent 72d4d3c commit 20f5e97
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 26 deletions.
2 changes: 1 addition & 1 deletion docs/docs/01-start-here/01-getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Come say hi, hang out, geek out, help friends and share your experience ❤️
[Wing Community Slack]: https://t.winglang.io/slack

TL;DR: if you can't be bothered with all the philosophical blabber, feel free to
jump right in and [get started](./).
jump right in and [install](./02-installation.md).

## What is a cloud-oriented language?

Expand Down
1 change: 1 addition & 0 deletions docs/docs/01-start-here/02-installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ You can also just delete `~/.npmrc` if there are no other registries that you ar
</details>

<br/>

Install the Wing CLI through npm:

```sh
Expand Down
1 change: 1 addition & 0 deletions docs/docs/01-start-here/03-hello.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ let queue = new cloud.Queue();

queue.setConsumer(inflight (message: str) => {
bucket.put("wing.txt", "Hello, ${message}");
log("file created");
});
```

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/01-start-here/04-run-locally.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ You are now able to run your IDE and the Wing Console side-by-side and watch how

## The Wing Console view

In the console [map view](../tools/wing-console#view-and-explore-your-wing-application) you'll see three resources: a **Queue**, a **Function** and a **Bucket**.
In the console [map view](../06-tools/02-wing-console.md#map-view) you'll see three resources: a **Queue**, a **Function** and a **Bucket**.
The Queue and the Bucket are connected through the Function resource, which serves as a message handler and is set as the consumer for the Queue.

Click on the Queue resource and pay attention to the right hand panel. This is the [resource interaction panel](../tools/wing-console#interact-with-your-wing-application).
Expand Down
70 changes: 50 additions & 20 deletions docs/docs/01-start-here/05-aws.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ resources, using Terraform as the provisioning engine.

:::info Under Construction

:construction: We plan to support [AWS](https://github.com/winglang/wing/issues?q=is:issue+is:open+sort:updated-desc+label:aws), [Azure](https://github.com/winglang/wing/issues?q=is:issue+is:open+sort:updated-desc+label:azure) and [Google Cloud](https://github.com/winglang/wing/issues?q=is:issue+is:open+sort:updated-desc+label:gcp) as targets out of
:construction: We plan to also support [Azure](https://github.com/winglang/wing/issues?q=is:issue+is:open+sort:updated-desc+label:azure) and [Google Cloud](https://github.com/winglang/wing/issues?q=is:issue+is:open+sort:updated-desc+label:gcp) as targets out of
the box. In addition, we are planning support for other provisioning engines
such as AWS CloudFormation and Kubernetes.

Expand All @@ -36,7 +36,9 @@ Click :thumbsup: on the relevant issue and tell us what you think.
In order to deploy to AWS, you will need:

* [Terraform](https://terraform.io/downloads)
* [AWS account] and the [AWS CLI] with [AWS credentials]
* AWS CLI with configured credentials. See
[here](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html)
for more information.

## Compile to Terraform/AWS

Expand Down Expand Up @@ -80,31 +82,59 @@ Now we are ready to deploy to our AWS account:
terraform apply
```

You'll be asked to confirm the provisioning of all of these resources:
You should expect output similar to this:
```sh
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
+ create

```
aws_iam_role.root_cloudQueue_AddConsumerf9e5f4b154bf0692_IamRole_0F5B0FAB
aws_iam_role_policy.root_cloudQueue_AddConsumerf9e5f4b154bf0692_IamRolePolicy_D4EB5385
aws_iam_role_policy_attachment.root_cloudQueue_AddConsumerf9e5f4b154bf0692_IamRolePolicyAttachment_EEE67DAF
aws_lambda_event_source_mapping.root_cloudQueue_EventSourceMapping_A2041279
aws_lambda_function.root_cloudQueue_AddConsumerf9e5f4b154bf0692_7D66EFB8
aws_s3_bucket.root_cloudBucket_4F3C4F53
aws_s3_bucket.root_cloudQueue_AddConsumerf9e5f4b154bf0692_Bucket_22152053
aws_s3_bucket_public_access_block.root_cloudBucket_PublicAccessBlock_319C1C2E
aws_s3_bucket_server_side_encryption_configuration.root_cloudBucket_Encryption_8ED0CD9C
aws_s3_object.root_cloudQueue_AddConsumerf9e5f4b154bf0692_S3Object_A34E0128
aws_sqs_queue.root_cloudQueue_E3597F7A
Terraform will perform the following actions:

# aws_iam_role.cloudQueue-SetConsumer-cdafee6e_IamRole_2548D828 will be created
+ resource "aws_iam_role" "cloudQueue-SetConsumer-cdafee6e_IamRole_2548D828" {...}

# aws_iam_role_policy.cloudQueue-SetConsumer-cdafee6e_IamRolePolicy_37133937 will be created
+ resource "aws_iam_role_policy" "cloudQueue-SetConsumer-cdafee6e_IamRolePolicy_37133937" {...}

# aws_iam_role_policy_attachment.cloudQueue-SetConsumer-cdafee6e_IamRolePolicyAttachment_45079F65 will be created
+ resource "aws_iam_role_policy_attachment" "cloudQueue-SetConsumer-cdafee6e_IamRolePolicyAttachment_45079F65" {...}

# aws_lambda_event_source_mapping.cloudQueue_EventSourceMapping_41814136 will be created
+ resource "aws_lambda_event_source_mapping" "cloudQueue_EventSourceMapping_41814136" {...}

# aws_lambda_function.cloudQueue-SetConsumer-cdafee6e will be created
+ resource "aws_lambda_function" "cloudQueue-SetConsumer-cdafee6e" {...}

# aws_s3_bucket.Code will be created
+ resource "aws_s3_bucket" "Code" {...}

# aws_s3_bucket.cloudBucket will be created
+ resource "aws_s3_bucket" "cloudBucket" {...}

# aws_s3_bucket_public_access_block.cloudBucket_PublicAccessBlock_5946CCE8 will be created
+ resource "aws_s3_bucket_public_access_block" "cloudBucket_PublicAccessBlock_5946CCE8" {...}

# aws_s3_bucket_server_side_encryption_configuration.cloudBucket_Encryption_77B6AEEF will be created
+ resource "aws_s3_bucket_server_side_encryption_configuration" "cloudBucket_Encryption_77B6AEEF" {...}

# aws_s3_object.cloudQueue-SetConsumer-cdafee6e_S3Object_8868B9FB will be created
+ resource "aws_s3_object" "cloudQueue-SetConsumer-cdafee6e_S3Object_8868B9FB" {...}

# aws_sqs_queue.cloudQueue will be created
+ resource "aws_sqs_queue" "cloudQueue" {...}

Plan: 11 to add, 0 to change, 0 to destroy.
```

> This is a good opportunity to observe how much complexity the Wing compiler
> was able to abstract away for you when you wrote your Wing code. Just
> saying...
And Terraform will do its magic and will create all of these resources in your
If you choose to proceed, Terraform will do its magic and will create all of these resources in your
account.

```
Apply complete! Resources: 8 added, 0 changed, 0 destroyed.
```
Apply complete! Resources: 11 added, 0 changed, 0 destroyed.
```

## Explore your app on AWS
Expand All @@ -118,7 +148,7 @@ through the AWS Management Console.
4. Click **Send and receive messages**.
5. In the **Message Body** box type `cloud` and hit **Send message**.
6. Jump over to the [S3 Console](https://s3.console.aws.amazon.com/s3/buckets)
7. There should be some buckets prefixed with `terraform-202`.
7. There should be some buckets prefixed with `cloud-bucket-`.
8. Cycle through the buckets until you find one that contains `wing.txt`.
9. Click `wing.txt` then click the `Open` button.
10. The file should contain `Hello, cloud`.
Expand All @@ -129,4 +159,4 @@ Once you're done, you can destroy all of the resources that were created on your

```sh
terraform destroy
```
```
23 changes: 19 additions & 4 deletions docs/docs/06-tools/02-wing-console.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,40 @@ The Wing Console is installed as part of the [Wing CLI installation](../01-start

## View And Explore your Wing application
The Console offers two primary views to provide a comprehensive understanding of your Wing application: the Explorer view and the Map view.
1. The left side of the Console features the **Explorer** view, displaying the hierarchical structure of resources within your application.

### Explorer view

The left side of the Console features the **Explorer** view, displaying the hierarchical structure of resources within your application.

![The Wing Console Explorer view](console-explorer-1.png 'Wing Console Explorer')
2. Positioned at the center is the **Application Map** view, presenting an overview of the resources in your application along with their relations with each other.

### Map view

Positioned at the center is the **Application Map** view, presenting an overview of the resources in your
application along with their relations with each other.

![The Wing Console Map view](console-map-1.png 'Wing Console Map')

## Interact with your Wing application
The Console provides seamless interaction with your Wing application resources, right within the Console interface itself.

When you click on a resource in either the Explorer or Map view, the resource interaction panel on the right side of the Console will automatically update. This panel enables you to conveniently interact with the selected resource.
When you click on a resource in either the Explorer or Map view, the resource interaction panel on the right
side of the Console will automatically update. This panel enables you to conveniently interact with the selected resource.

From there, you can perform various actions such as sending messages to queues, downloading files from buckets, making API requests to your API resource, and more.

![The Wing Console Interaction view](console-interaction-1.png 'Wing Console Interaction')

## Run Tests

The Console enables you to run the tests you wrote for your Wing application and view the results of these tests in real-time.

![The Wing Console Tests](console-tests-1.png 'Wing Console Tests')

## Logs

In addition to Interaction abilities, the Console includes a dedicated Logs view, designed for testing and debugging purposes. This view presents real-time logs of your application.

Any logs that you generate within your Wing Application will be automatically displayed within the Logs view, providing you with convenient monitoring of your application's behavior.
![The Wing Console Logs](console-logs-1.png 'Wing Console Logs')

![The Wing Console Logs](console-logs-1.png 'Wing Console Logs')

0 comments on commit 20f5e97

Please sign in to comment.