You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* add command shortcode and refactor first documents to use it
* change more commands to new shortcode
* format more commands to the shortcode
* fix the last of the commands
* add python code type
* reafactor code fences to use proper language or command shortcode
* fix typo in cloudformation
* add command shortcode to best practices
* add more comments to the shortcode
Co-authored-by: Alexander Rashed <[email protected]>
Copy file name to clipboardexpand all lines: README.md
+4-1
Original file line number
Diff line number
Diff line change
@@ -42,6 +42,7 @@ alternatively:
42
42
## Best Practices
43
43
44
44
Please follow these best practices when writing documentation here:
45
+
- Use the custom `command` shortcode for all one-liner commands (also when their output is presented). Do not use it for bash scripts with comments. You can find a more detailed description here: https://github.com/localstack/docs/pull/55
45
46
- Use the [`ref` or `relref` shortcode](https://gohugo.io/content-management/cross-references/#use-ref-and-relref) when creating non-external links (but still use the markdown native image linking, ref doesn't work there).
46
47
You can either use `ref` or `relref`, the point is to have compile time internal-link checks (which works for both).
47
48
- Stick to markdown if possible.
@@ -50,6 +51,8 @@ Please follow these best practices when writing documentation here:
50
51
- For snippets, define the correct syntax highlighting.
- If you want to hightlight a specific line, there's a feature for that: https://gohugo.io/content-management/syntax-highlighting/#highlighting-in-code-fences
55
+
- This is also supported by the `command` shortcode!
53
56
- Handling images can be a bit tedious with Hugo.
54
57
If you want to use images in your post, create a new [leaf bundle directory](https://github.com/gohugoio/hugo/issues/1240) and put the image and the post (named `index.md`) in there (you can find examples in the docs already, f.e. the cognito service docs).
55
58
@@ -59,4 +62,4 @@ Please follow these best practices when writing documentation here:
59
62
If you want to resize the image, use the `figure` shortcode.
60
63
- Use relative paths to cross-reference between pages
61
64
62
-
PS.: Feel free to add more best practices here (also give us a heads-up in [#sig-docs](https://localstack-cloud.slack.com/archives/C02FZH6UB2A)).
65
+
PS.: Feel free to add more best practices here (also give us a heads-up in [#sig-docs](https://localstack-cloud.slack.com/archives/C02FZH6UB2A)).
Copy file name to clipboardexpand all lines: content/en/docs/Getting started/_index.md
+22-21
Original file line number
Diff line number
Diff line change
@@ -48,25 +48,26 @@ Please make sure to install the following tools on your machine before moving on
48
48
#### Installation
49
49
The easiest way to install the LocalStack CLI is via `pip`:
50
50
51
-
```sh
52
-
python3 -m pip install localstack
53
-
```
51
+
{{< command >}}
52
+
$ python3 -m pip install localstack
53
+
{{< / command >}}
54
54
55
55
{{< alert >}}
56
56
**Note**: Please do **not** use `sudo` or the `root` user - LocalStack should be installed and started entirely under a local non-root user.
57
57
If you have problems with permissions in MacOS X Sierra, install with `python3 -m pip install --user localstack`.
58
58
{{< /alert >}}
59
59
60
60
Afterwards you should be able to use the LocalStack CLI in your terminal:
61
-
```
61
+
62
+
{{< command >}}
62
63
$ localstack --help
63
64
Usage: localstack [OPTIONS] COMMAND [ARGS]...
64
65
65
66
The LocalStack Command Line Interface (CLI)
66
67
67
68
Options:
68
69
...
69
-
```
70
+
{{< / command >}}
70
71
71
72
#### Troubleshooting
72
73
##### The installation is successful, but I cannot execute `localstack` on my terminal.
@@ -75,16 +76,16 @@ If you can successfully install LocalStack using `pip` but you cannot use it in
75
76
- If you are using a MacOS or Linux operating system, please make sure that the `PATH` is correctly set up - either system wide, or in your terminal.
76
77
77
78
As a workaround you can call the LocalStack CLI python module directly:
78
-
```sh
79
-
python3 -m localstack.cli.main
80
-
```
79
+
{{< command >}}
80
+
$ python3 -m localstack.cli.main
81
+
{{< / command >}}
81
82
82
83
#### Starting LocalStack with the LocalStack CLI
83
84
By default, LocalStack is started inside a Docker container by running:
84
85
85
-
```sh
86
-
localstack start
87
-
```
86
+
{{< command >}}
87
+
$ localstack start
88
+
{{< / command >}}
88
89
89
90
{{< alert title="Notes" >}}
90
91
- This command starts all services provided by LocalStack.
@@ -108,9 +109,9 @@ You can check if `docker` is correctly configured on your machine by executing `
108
109
109
110
#### Starting LocalStack with Docker
110
111
You can start the Docker container simply by executing the following `docker run` command:
111
-
```
112
-
docker run --rm -it -p 4566:4566 -p 4571:4571 localstack/localstack
113
-
```
112
+
{{< command >}}
113
+
$ docker run --rm -it -p 4566:4566 -p 4571:4571 localstack/localstack
114
+
{{< / command >}}
114
115
115
116
{{< alert title="Notes" >}}
116
117
- This command pulls the current nighty build from the `master` branch (if you don't have the image locally) and **not** the latest supported version.
@@ -139,9 +140,9 @@ If you want to manually manage your Docker container, it's usually a good idea t
139
140
#### Starting LocalStack with Docker-Compose
140
141
You can use the [`docker-compose.yml` file from the official LocalStack repository](https://github.com/localstack/localstack/blob/master/docker-compose.yml) and use this command (currently requires `docker-compose` version 1.9.0+):
141
142
142
-
```
143
-
docker-compose up
144
-
```
143
+
{{< command >}}
144
+
$ docker-compose up
145
+
{{< / command >}}
145
146
146
147
{{< alert title="Notes" >}}
147
148
- This command pulls the current nighty build from the `master` branch (if you don't have the image locally) and **not** the latest supported version.
@@ -163,10 +164,10 @@ If you want to deply LocalStack in your [Kubernetes](https://kubernetes.io) clus
163
164
164
165
#### Deploy LocalStack using Helm
165
166
You can deploy LocalStack in a Kubernetes cluster by running these commands:
Copy file name to clipboardexpand all lines: content/en/docs/Getting started/getting-started-pro/index.md
+13-13
Original file line number
Diff line number
Diff line change
@@ -31,31 +31,31 @@ You can find your API key in the [LocalStack Web Interface](https://app.localsta
31
31
LocalStack Pro expects your API key to be present in the environment variable `LOCALSTACK_API_KEY`.
32
32
Before starting LocalStack, please define the environment variable in your terminal like this:
33
33
34
-
```sh
34
+
{{< command >}}
35
35
$ export LOCALSTACK_API_KEY=<your-api-key>
36
-
```
36
+
{{< / command >}}
37
37
38
38
### Starting LocalStack Pro using the CLI
39
39
40
40
When starting LocalStack using the LocalStack CLI, you dot not have to perform any further steps (after exporting the environment variable).
41
-
```sh
41
+
{{< command >}}
42
42
$ localstack start
43
-
```
43
+
{{< / command >}}
44
44
45
45
LocalStack will detect the API key and properly pass it to the LocalStack container.
46
46
47
47
### Starting LocalStack Pro using Docker
48
48
49
49
When starting LocalStack using a `docker run` command, you have to specify the API key using the `-e` flag for environment variables like this:
50
50
51
-
{{< highlight bash "hl_lines=5" >}}
52
-
docker run \
51
+
{{< command "hl_lines=5" >}}
52
+
$ docker run \
53
53
--rm -it \
54
54
-p 4566:4566 \
55
55
-p 4571:4571 \
56
56
-e LOCALSTACK_API_KEY=${LOCALSTACK_API_KEY:- } \
57
57
localstack/localstack
58
-
{{< / highlight >}}
58
+
{{< / command >}}
59
59
60
60
For more information about starting LocalStack, take a look at our general [Getting Started]({{< ref "Getting started" >}}) guide.
61
61
@@ -79,9 +79,9 @@ If you want to make sure that LocalStack is only started if LocalStack Pro can b
79
79
80
80
The easiest way to check if LocalStack Pro is activated is to check the health endpoing of LocalStack for a list of the running services:
81
81
82
-
```
83
-
curl localhost:4566/health | jq
84
-
```
82
+
{{< command >}}
83
+
$ curl localhost:4566/health | jq
84
+
{{< / command >}}
85
85
86
86
If a Pro-only [service]({{< ref "Local AWS Services" >}}) -- like [XRay]({{< ref "XRay-Tracing" >}}) -- is running, LocalStack Pro has started successfully.
87
87
@@ -129,9 +129,9 @@ socket.gaierror: [Errno -3] Temporary failure in name resolution
129
129
130
130
Please confirm this by using a tool like `dig`:
131
131
132
-
```sh
133
-
dig api.localstack.cloud
134
-
```
132
+
{{< command >}}
133
+
$ dig api.localstack.cloud
134
+
{{< / command >}}
135
135
136
136
If the result has some other status than `status: NOERROR`, your machine cannot resolve this domain.
Copy file name to clipboardexpand all lines: content/en/docs/Integrations/architect/index.md
+15-14
Original file line number
Diff line number
Diff line change
@@ -17,23 +17,24 @@ If you are adapting an existing configuration, you might be able to skip certain
17
17
## Example
18
18
19
19
### Setup
20
-
To use Architect in conjunction with Localstack, simply install the ```arclocal``` command (sources can be found [here](https://github.com/localstack/architect-local)).
The ``` arclocal``` command has the same usage as the ```arc``` command, so you can start right away.
20
+
To use Architect in conjunction with Localstack, simply install the `arclocal` command (sources can be found [here](https://github.com/localstack/architect-local)).
Use the below command to install `aws`, if not installed already.
32
32
33
-
```
34
-
pip install awscli
35
-
```
33
+
{{< command >}}
34
+
$ pip install awscli
35
+
{{< / command >}}
36
36
37
37
### Setting up local region and credentials to run LocalStack
38
38
39
39
aws requires the region and the credentials to be set in order to run the aws commands.
40
40
Create the default configuration and the credentials.
41
41
Below key will ask for the Access key id, secret Access Key, region & output format.
42
+
Config & credential file will be created under ~/.aws folder
42
43
43
-
```
44
-
aws configure --profile default
45
-
46
-
# Config & credential file will be created under ~/.aws folder
47
-
```
44
+
{{< command >}}
45
+
$ aws configure --profile default
46
+
{{< / command >}}
48
47
49
48
{{< alert >}}
50
49
**Note** Please use `test` as value for AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY to make pre-signed URLs for S3 buckets work.
@@ -68,14 +67,14 @@ The source code can be found on GitHub: https://github.com/localstack/awscli-loc
68
67
69
68
You can install the `awslocal` command via `pip`:
70
69
71
-
```
72
-
pip install awscli-local[ver1]
73
-
```
70
+
{{< command >}}
71
+
$ pip install awscli-local[ver1]
72
+
{{< / command >}}
74
73
75
74
Note that the command above also installs the latest version of the underlying AWS CLI version 1 (`awscli`) package. Use this command if you prefer to manage your own version of `awscli` (e.g., `v1`/`v2`) and install the wrapper script only:
76
-
```
77
-
pip install awscli-local
78
-
```
75
+
{{< command >}}
76
+
$ pip install awscli-local
77
+
{{< / command >}}
79
78
80
79
{{< alert >}}
81
80
**Note:** Automatic installation of AWS CLI version 2 is currently not supported yet (at the time of writing there is no official pypi package for `v2` available), but the `awslocal` technically also works with AWS CLI v2 (see [this section]({{< ref "#limitations" >}}) for more details).
@@ -107,11 +106,11 @@ To work around this issue, you have 2 options:
107
106
We do not recommend this, but it is technically possible.
108
107
Also, you should install these libraries in a Python virtualenv, to avoid version clashes with other libraries on your system:
0 commit comments