This is an example of how to configure and deploy a development environment that includes polyglot microservices, an AWS SQS queue, and an S3 bucket. The AWS infrastructure is deployed using Terraform.
-
Okteto CLI 3.0 or newer
-
An AWS account
-
An Okteto account (Sign-up for 30 day, self-hosted free trial)
-
Create a set of IAM keys for your AWS account (If you are using Okteto Self-Hosted, you can directly assign an AWS Role)
-
Create the following Okteto secrets:
AWS_ACCESS_KEY_ID: The Acces Key ID of your IAM user AWS_SECRET_ACCESS_KEY: The Secret Acces Key of your IAM user AWS_REGION: The region in AWS you would like to use for the external resources
Make sure this AWS user has permissions to create, read from, and delete the following AWS services:
- SQS Queues
- S3 Buckets
Alternatively if you are using Okteto Self-Hosted, you can configure your instance to use an AWS role instead of using an Access Key and Secret Access Key.
Once this is configured, anyone with access to your Okteto instance will be able to deploy an development environment automatically, including the required cloud infrastructure.
$ git clone https://github.com/okteto/external-resources-tf-aws
$ cd external-resources-aws
$ okteto context use $OKTETO_URL
$ okteto deploy
$ okteto up menu
$ okteto up kitchen
$ okteto up check
To run the e2d tests directly in Okteto, execute the command below.
$ okteto test e2e
This isn't an example of a properly architected perfectly designed distributed app... it's a simple example of the various types of pieces and languages you might see (queues, persistent data, etc), and how to deal with them in Okteto.
Happy coding!