Skip to content

Commit

Permalink
improve the installation page (#2)
Browse files Browse the repository at this point in the history
* improve the installation page

* fix nits
  • Loading branch information
HarshCasper authored Feb 28, 2024
1 parent 93faa0d commit c28f68a
Showing 1 changed file with 77 additions and 8 deletions.
85 changes: 77 additions & 8 deletions content/en/getting-started/installation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,85 @@ description: Basic installation guide to get started with the LocalStack Snowfla

You can set up the LocalStack Snowflake emulator by utilizing LocalStack's Extension mechanism. There are two methods for installing the LocalStack Snowflake emulator:

1. Using the [`localstack` CLI](https://docs.localstack.cloud/getting-started/installation/#localstack-cli)
2. Using [Docker Compose](https://docs.docker.com/compose/install/)

This guide provides step-by-step instructions for installing the emulator using both methods.
- [Snowflake Docker image](https://hub.docker.com/r/localstack/snowflake)
- [LocalStack Extension mechanism](https://docs.localstack.cloud/user-guide/extensions/)

{{<alert type="info">}}
Before starting, ensure you have a valid `LOCALSTACK_AUTH_TOKEN` to access the LocalStack Snowflake emulator. Refer to the [Auth Token guide](https://docs.localstack.cloud/getting-started/auth-token/) to obtain your Auth Token and specify it in the `LOCALSTACK_AUTH_TOKEN` environment variable.
{{</alert>}}

## `localstack` CLI
## Snowflake Docker image

You can use the Snowflake Docker image to run the LocalStack Snowflake emulator. The Snowflake Docker image is available on the [LocalStack Docker Hub](https://hub.docker.com/r/localstack/snowflake). To pull the Snowflake Docker image, execute the following command:

{{< command >}}
$ docker pull localstack/snowflake
{{< / command >}}

You can start the Snowflake Docker container using the following methods:

1. [`localstack` CLI](https://docs.localstack.cloud/getting-started/installation/#localstack-cli)
2. [`docker` CLI](https://docs.docker.com/get-docker/)
2. [Docker Compose](https://docs.docker.com/compose/install/)

### `localstack` CLI

To start the Snowflake Docker container using the `localstack` CLI, execute the following command:

{{< command >}}
$ export LOCALSTACK_AUTH_TOKEN=<your_auth_token>
$ IMAGE_NAME=localstack/snowflake localstack start
{{< / command >}}

### `docker` CLI

To start the Snowflake Docker container using the `docker` CLI, execute the following command:

{{< command >}}
$ docker run \
--rm -it \
-p 4566:4566 \
-e LOCALSTACK_AUTH_TOKEN=${LOCALSTACK_AUTH_TOKEN:?} \
localstack/snowflake
{{< / command >}}

### Docker Compose

Create a `docker-compose.yml` file with the specified content:

```yaml
version: "3.8"

services:
localstack:
container_name: "localstack-main"
image: localstack/snowflake
ports:
- "127.0.0.1:4566:4566"
environment:
- LOCALSTACK_AUTH_TOKEN=${LOCALSTACK_AUTH_TOKEN:?}
volumes:
- "./volume:/var/lib/localstack"
```
Start the Snowflake Docker container with the following command:
{{< command >}}
$ docker-compose up
{{< / command >}}
### Updating
To update the Snowflake Docker container, pull the latest image and restart the container. The `latest` tag is the nightly build of the Snowflake Docker image.

## LocalStack Extension mechanism

The LocalStack Extension mechanism allows you to install and manage extensions for LocalStack. Extensions are packaged as Python applications, and can be installed using:

1. [`localstack` CLI](https://docs.localstack.cloud/getting-started/installation/#localstack-cli)
2. [Docker Compose](https://docs.docker.com/compose/install/)

### `localstack` CLI

To install the LocalStack Snowflake emulator using the `localstack` CLI, execute the following command:

Expand All @@ -37,9 +106,9 @@ Upon successful installation, you should see the output listing the installed ex
└────────────────────────────────┴─────────────────────────────────┴─────────┴────────────┴─────────────┘
```

## Docker Compose
### Docker Compose

To install the LocalStack Snowflake emulator using Docker Compose, use the `EXTENSION_AUTO_INSTALL` environment variable for automatic extension installation. Create a `docker-compose.yml` file with the specified content.
To install the LocalStack Snowflake emulator using Docker Compose, use the `EXTENSION_AUTO_INSTALL` environment variable for automatic extension installation. Create a `docker-compose.yml` file with the specified content:

```yaml
version: "3.8"
Expand All @@ -66,7 +135,7 @@ Start the LocalStack Snowflake emulator with the following command:
$ docker-compose up
{{< / command >}}

## Updating
### Updating

To update the LocalStack Snowflake emulator using the `localstack` CLI, uninstall and install the extension again:

Expand Down

0 comments on commit c28f68a

Please sign in to comment.