Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove any reference to the localstack extension #47

Merged
merged 1 commit into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 6 additions & 83 deletions content/en/getting-started/installation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,7 @@ description: Basic installation guide to get started with LocalStack for Snowfla

## Introduction

There are two methods for installing the Snowflake emulator:

- [Snowflake Docker image](https://hub.docker.com/r/localstack/snowflake) (recommended)
- [LocalStack Extension mechanism](https://docs.localstack.cloud/user-guide/extensions/) (deprecated)

{{<alert type="info">}}
Before starting, ensure you have a valid `LOCALSTACK_AUTH_TOKEN` to access the 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>}}

## Snowflake Docker image

You can use the Snowflake Docker image to run the Snowflake emulator - this is the recommended way of installation.
You can use the Snowflake Docker image to run the 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:

Expand All @@ -32,6 +21,10 @@ You can start the Snowflake Docker container using the following methods:
2. [`docker` CLI](https://docs.docker.com/get-docker/)
2. [Docker Compose](https://docs.docker.com/compose/install/)

{{<alert type="info">}}
Before starting, ensure you have a valid `LOCALSTACK_AUTH_TOKEN` to access the 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

To start the Snowflake Docker container using the `localstack` CLI, execute the following command:
Expand Down Expand Up @@ -78,80 +71,10 @@ Start the Snowflake Docker container with the following command:
$ docker-compose up
{{< / command >}}

### Updating
## 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 (deprecated)

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/)

Note that installing the Snowflake emulator via the LocalStack Extension mechanism is deprecated by now, and is not guaranteed to work with all versions of LocalStack.
We recommend using the custom LocalStack Snowflake Docker image, described further above in this document.

### `localstack` CLI

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

{{< command >}}
$ localstack extensions install localstack-extension-snowflake
{{< / command >}}

Upon successful installation, you should see the output listing the installed extension.

```bash
[20:30:06] Extension successfully installed extensions.py:86
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━┓
┃ Name ┃ Summary ┃ Version ┃ Author ┃ Plugin name ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━┩
│ localstack-extension-snowflake │ LocalStack Extension: Snowflake │ 0.1.22 │ LocalStack │ snowflake │
└────────────────────────────────┴─────────────────────────────────┴─────────┴────────────┴─────────────┘
```

### Docker Compose

To install the 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"

services:
localstack:
container_name: "localstack-main"
image: localstack/localstack-pro
ports:
- "127.0.0.1:4566:4566"
- "127.0.0.1:4510-4559:4510-4559"
environment:
- LOCALSTACK_AUTH_TOKEN=${LOCALSTACK_AUTH_TOKEN:?}
- DEBUG=1
- EXTENSION_AUTO_INSTALL=localstack-extension-snowflake
volumes:
- "./volume:/var/lib/localstack"
- "/var/run/docker.sock:/var/run/docker.sock"
```

Start the Snowflake emulator with the following command:

{{< command >}}
$ docker-compose up
{{< / command >}}

### Updating

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

{{< command >}}
$ localstack extensions uninstall localstack-extension-snowflake
$ localstack extensions install localstack-extension-snowflake
{{< / command >}}

For Docker Compose, update the extension by restarting the LocalStack container.

## Troubleshooting

### How to check if the Snowflake emulator is running?
Expand Down
19 changes: 4 additions & 15 deletions content/en/tutorials/aws-lambda-localstack-snowpark/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,25 +138,14 @@ Start your LocalStack container in your preferred terminal/shell.

{{< command >}}
$ export LOCALSTACK_AUTH_TOKEN=<your_auth_token>
$ DEBUG=1 LAMBDA_RUNTIME_ENVIRONMENT_TIMEOUT=180 localstack start
$ DEBUG=1 \
LAMBDA_RUNTIME_ENVIRONMENT_TIMEOUT=180 \
IMAGE_NAME=localstack/snowflake \
localstack start
{{< / command >}}

> The `DEBUG=1` environment variable is set to enable debug logs. It would allow you to see the SQL queries executed by the Lambda function. The `LAMBDA_RUNTIME_ENVIRONMENT_TIMEOUT` environment variable is set to increase the Lambda function's timeout to 180 seconds.

Check the emulator's availability by running:

{{< command >}}
$ localstack extensions list
<disable-copy>
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━┓
┃ Name ┃ Summary ┃ Version ┃ Author ┃ Plugin name ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━┩
│ localstack-extension-snowfl… │ LocalStack Extension: │ 0.1.22 │ LocalStack │ snowflake │
│ │ Snowflake │ │ │ │
└──────────────────────────────┴───────────────────────────────┴─────────┴────────────┴─────────────┘
</disable-copy>
{{< / command >}}

## Deploy the Lambda function

You can now deploy the Lambda function to LocalStack using the `awslocal` CLI. Run the following command:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,7 @@ Start your LocalStack container in your preferred terminal/shell.

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

Check the emulator's availability by running:

{{< command >}}
$ localstack extensions list
<disable-copy>
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━┓
┃ Name ┃ Summary ┃ Version ┃ Author ┃ Plugin name ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━┩
│ localstack-extension-snowfl… │ LocalStack Extension: │ 0.1.22 │ LocalStack │ snowflake │
│ │ Snowflake │ │ │ │
└──────────────────────────────┴───────────────────────────────┴─────────┴────────────┴─────────────┘
</disable-copy>
$ IMAGE_NAME=localstack/snowflake localstack start
{{< / command >}}

## Create a Snowpark session
Expand Down
Loading