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

Terraform config to deploy k3s to an ec2 instance #66

Closed
Tracked by #62
clshaw01 opened this issue May 22, 2023 · 1 comment
Closed
Tracked by #62

Terraform config to deploy k3s to an ec2 instance #66

clshaw01 opened this issue May 22, 2023 · 1 comment

Comments

@clshaw01
Copy link
Contributor

clshaw01 commented May 22, 2023

Create a terraform config to deploy k3s on a new ec2 instance. Set up a security group to only allow access on ports 80 (HTTP), 443 (HTTPS), and 6443 (Kubernetes API port). Add a README to document how to deploy the new cluster and set up access to the Kubernetes cluster.

@clshaw01 clshaw01 added this to the MVP Sandbox Deployment milestone May 22, 2023
@rochecompaan rochecompaan changed the title K3s on EC2 (Postgres, Redis, Django, Celery, Flower inside the cluster) Terraform config to deploy k3s to an ec2 instance May 24, 2023
@nvernooy
Copy link
Contributor

Once Best passes QA use sfu-best/terraform as template

rochecompaan pushed a commit that referenced this issue Jun 28, 2024
## 1.0.0 (2024-06-28)

### Features

* add .envrc for reading from 1Password and update readme [#78](#78) ([b622f52](b622f52))
* add acm for cloudfront [#67](#67) ([58617c2](58617c2))
* add application module for shared manifests [#92](#92) ([c6b55ff](c6b55ff))
* add argocd controlplane [#77](#77) ([e34f85d](e34f85d))
* add aws_s3_custom_domain ([cc22cc2](cc22cc2))
* add aws_s3_custom_domain to backend ([6faafc6](6faafc6))
* add cloudfront manifests [#67](#67) ([d291d18](d291d18))
* add daphne to requirements [#71](#71) ([b1e1c6b](b1e1c6b))
* add Dockerfile ([c6389e7](c6389e7))
* add dotenv file [#108](#108) ([ce65257](ce65257))
* add frontend Dockerfile ([5d387e3](5d387e3))
* add frontend tests ([f38b7d5](f38b7d5))
* add iam user with bucket access policy [#86](#86) ([b2c0d3c](b2c0d3c))
* add liveness and readiness probes ([cd2f504](cd2f504))
* add mailhog kustomization layer for reuse in local and sandbox ([1d7d9c7](1d7d9c7))
* add management and ECR manifests [#74](#74) ([21d58fc](21d58fc))
* add manifests to create ec2 instance with k3s [#66](#66) ([1c4c023](1c4c023))
* add Nix Flake development environment ([391ce10](391ce10))
* add Nix Flake for development on Scaf ([fd7d759](fd7d759))
* add route53 for prod and sandbox [#68](#68) ([cd0e6cc](cd0e6cc))
* add s3 storage for static content [#86](#86) ([8d1f3fd](8d1f3fd))
* add s3 storage to Django media uploads and static resources ([efd5e02](efd5e02))
* add sealed secrets template to k8s [#78](#78) ([07d92e0](07d92e0))
* add semantic release ([805b566](805b566))
* add sentry to configmap [#76](#76) ([9b7c60d](9b7c60d))
* add sentry to react frontend [#108](#108) ([50e811e](50e811e))
* add template for control plane [#78](#78) ([75ebafd](75ebafd))
* add templates for argocd application [#77](#77) ([26cba6d](26cba6d))
* add Tilt support. Close [#58](#58) ([7c60bed](7c60bed))
* add Tilt support. Close [#58](#58) ([5d45522](5d45522))
* allow overriding template path ([d10e46a](d10e46a))
* allow public access to static s3 [#86](#86) ([2895c91](2895c91))
* change service type to ClusterIP ([03b757b](03b757b))
* clean up terraform plan for scaf ([371649e](371649e))
* configure django for s3 storage [#86](#86) ([6b363ed](6b363ed))
* extend with cookiecutter options ([c58881a](c58881a))
* github actions workflow to test scaf project create ([79ed57b](79ed57b))
* initialize cluster with kind ([79a5d51](79a5d51))
* install cert manager into cluster [#70](#70) ([e4e130e](e4e130e))
* install kubectl, kind and tilt ([899b742](899b742))
* install script ([21d5839](21d5839))
* keep PVs across tilt restart. closes [#124](#124) ([507e116](507e116))
* keep PVs across tilt restart. closes [#124](#124) ([a244ba2](a244ba2))
* make sentry optional ([21c48ea](21c48ea))
* make sentry optional (close [#177](#177)) ([b1e8c38](b1e8c38))
* patch daphne into prod and sandbox manifests [#71](#71) ([ea71d1f](ea71d1f))
* remove need for base64 encoded values [#78](#78) ([331afaf](331afaf))
* run migrations as init container ([7da6182](7da6182))
* run migrations as init container ([355e41d](355e41d))
* run scaf using IMAGE_TAG environment variable ([77a2e01](77a2e01))
* scaf script. WIP ([fdb17a0](fdb17a0))
* semantic-release github workflow ([6ee3021](6ee3021))
* serve static content from static_storage bucket ([c5af2e1](c5af2e1))
* set SCAF_SCRIPT_BRANC ([b5991fb](b5991fb))
* simplify install, rename project and update docs. closes [#157](#157) closes [#130](#130) ([8585799](8585799))
* terraform config to set up k3s on an aws ec2 instance ([9152972](9152972))
* tilt console output recommendation ([4e916e0](4e916e0))
* update ingress to use ingressroute [#70](#70) ([4a37b2d](4a37b2d))
* update k8s deployment ([2d8ded9](2d8ded9))
* use entrypoint to match host and container scaf user ([e64aace](e64aace))
* use k8s_resource to create port forwards ([6dda6cc](6dda6cc))
* use semantic-release for versioning ([958917d](958917d))
* use sentry/react [#108](#108) ([83eacda](83eacda))
* use template for unencrypted secrets [#78](#78) ([7bc1d37](7bc1d37))
* validate project_slug ([b4f1728](b4f1728))
* verify npm package integrity ([6366828](6366828))

### Bug Fixes

* add additional use_sentry checks ([9feded1](9feded1))
* add database url to the environment ([9ad13f9](9ad13f9))
* add missing dependencies ([eeb9ff7](eeb9ff7))
* add missing env for pg_isready ([d05c074](d05c074))
* add organisation to image url ([487dc9c](487dc9c))
* add postgres host environment variable ([fbab221](fbab221))
* add quotes to region name ([04e0cb2](04e0cb2))
* add secrets-config secret for local dev. close [#175](#175) ([cef62cc](cef62cc))
* add secrets-config secret for local dev. close [#175](#175) ([e76fb96](e76fb96))
* add sentry to requirements [#76](#76) [#55](#55) ([0bf9b6a](0bf9b6a))
* add terraform to project gitignore ([344b1b3](344b1b3))
* ami_id output working ([3aac541](3aac541))
* broken install ([75a90d5](75a90d5))
* broken kustomization yaml (closes [#218](#218)) ([5e420b7](5e420b7))
* broken kustomization yaml again (closes [#218](#218)) ([3e85ab6](3e85ab6))
* build database_url from user and password [#78](#78) ([120d624](120d624))
* cd into project dir when running unit tests ([4976a47](4976a47))
* change ownership after fixing scaf uid and gid ([4d1684e](4d1684e))
* clean up k8s setup ([ea13adc](ea13adc))
* clean up patches ([c56732d](c56732d))
* clean up sandbox, inherit from prod, patch sandbox ([06f18db](06f18db))
* cleanup new line ([2538410](2538410))
* consolidate all cookiecutter variables ([ff41d58](ff41d58))
* consolidate how to read postgres_host variable ([f1697ac](f1697ac))
* create project with --no-input ([aa6cb34](aa6cb34))
* delete readme ([0b92814](0b92814))
* download script from branch that triggered workflow ([a0e2ae4](a0e2ae4))
* export SCAF_SCRIPT_BRANCH to make it avaiable in subshells ([0b7889c](0b7889c))
* fix copy paste ([4d657eb](4d657eb))
* fix for lint and formatting checks ([084d317](084d317))
* fix path ([5b52a4c](5b52a4c))
* groupmod: GID '20' already exists on MacOS ([191fa59](191fa59))
* include test dependencies ([2c0ff33](2c0ff33))
* install requirements before cd ([e5e284c](e5e284c))
* install requirements from backend dir ([635e41b](635e41b))
* install without checking out ([342d9f2](342d9f2))
* make tags mutable ([5c32917](5c32917))
* method name ([df9138c](df9138c))
* no need to shared with other containers ([ec92a0c](ec92a0c))
* non-interactive docker run option ([8afba7e](8afba7e))
* npm clean-install ([c44c205](c44c205))
* only create cluster if project is created successfully ([b7e6d19](b7e6d19))
* only run on push ([b24f123](b24f123))
* pin urllib3. Fixes [#60](#60) ([fe1ba78](fe1ba78))
* pin urllib3. Fixes [#60](#60) ([505d34e](505d34e))
* recreate readme with proper capitalization ([4a4b9b0](4a4b9b0))
* refactor cloudfront deprecated attributes [#86](#86) ([5196a32](5196a32))
* reference sha using github context property ([6f39226](6f39226))
* reference to branch name ([78a2f5e](78a2f5e))
* reference to GITHUB_SHA ([d4ca3ab](d4ca3ab))
* remove -t for non-interactive session ([d55e683](d55e683))
* remove 1pass ([be4932e](be4932e))
* remove build from `migrate` docker compose service ([bfb3651](bfb3651))
* remove control_plane files [#78](#78) ([75f9924](75f9924))
* remove duplicate cnpg files ([577f245](577f245))
* remove duplicate from merge ([84c32f7](84c32f7))
* remove mailhog from prod manifests [#80](#80) ([14a72f2](14a72f2))
* remove port since it defaults to 5432 ([f9a95b4](f9a95b4))
* remove using patchesStrategicMerge [#80](#80) ([0a81aad](0a81aad))
* rename file and policy [#86](#86) ([64660ac](64660ac))
* rename front-end to frontend ([6706d11](6706d11))
* rename variable ([a4348c9](a4348c9))
* run test commands directly when CI=true ([08e96ce](08e96ce))
* scaf repository url ([6e08e78](6e08e78))
* set POSTGRES_HOST for database url [#78](#78) ([61b5782](61b5782))
* split os and arch in kubectl download url ([d82da68](d82da68))
* step title ([63aa0b4](63aa0b4))
* strip whitespace and base64 encode env vars [#78](#78) ([c72604a](c72604a))
* update allowed hosts ([9a5a2b8](9a5a2b8))
* update cookiecutter template rendering ([05c4012](05c4012))
* update django-storages ([d6d32d7](d6d32d7))
* update formatting in readme [#78](#78) ([6daa86b](6daa86b))
* update gitignore ([2d1c74c](2d1c74c))
* update images tag for sandbox ([171ca98](171ca98))
* update liveliness and readiness probes, fix runserver host ([7cc5440](7cc5440))
* update pre_gen_project.py to also use higher python versions ([fc128e3](fc128e3))
* update sandbox dns name [#70](#70) ([1364a91](1364a91))
* update script URLs to simplify testing ([e58f8b3](e58f8b3))
* updates for s3 static storage, consolidate variables ([daac26b](daac26b))
* use "command -v" to check if command exists ([0c21b4a](0c21b4a))
* use command -v to check if command exists ([96f2a6a](96f2a6a))
* use COPY instead of ADD ([860d0f6](860d0f6))
* use correct application name ([849d9d6](849d9d6))
* use letsencrypt-staging by default [#70](#70) ([04a2e7c](04a2e7c))
* use NAMESPACE in secrets template ([9aa3450](9aa3450))
* use one template for kubeseal secrets [#78](#78) ([b702e38](b702e38))
* use postgress password in place of token [#78](#78) ([04e477e](04e477e))
* use project_dash for namespace ([3b6c5a9](3b6c5a9))
* use project-dash for buckets ([eaf0266](eaf0266))
* validate terraform ([764e4dc](764e4dc))
* wait for docker to be ready ([13f2067](13f2067))
* white-space breaks yaml file ([aabf1ad](aabf1ad))
* whitespace issue fixed in build-dev ([6f449bb](6f449bb))

### Documentation

* add detailed sentry steps to docs/sentry.md [#76](#76) ([248e178](248e178))
* add explanation of what the makefile targets do [#78](#78) ([411415b](411415b))
* add more detailed sealedsecrets instructions [#78](#78) ([0961058](0961058))
* add project name as arg to scaf command ([f5cd9b6](f5cd9b6))
* move kubernetes docs to generated project ([0f3f6ed](0f3f6ed))
* react setup docs. closes [#286](#286) ([510fc38](510fc38))
* reformat and add a few missing steps ([29a008e](29a008e))
* remove CHANGEME from sentry variable [#76](#76) ([1e3bc58](1e3bc58))
* remove controlplane section [#78](#78) ([bd0210e](bd0210e))
* remove make target and link to using direnv 78 ([6ceec55](6ceec55))
* remove skaffold from ec2-cluster readme [#78](#78) ([2234c5d](2234c5d))
* update contributor instructions ([567f28d](567f28d))
* update doc strings ([3733db7](3733db7))
* update intro, fix typos ([894ca8d](894ca8d))
* update readme ([1c1d0fd](1c1d0fd))
* update readme [#76](#76) ([51514d9](51514d9))
* update README [#77](#77) ([b6f1030](b6f1030))
* update README [#78](#78) ([e0f2cce](e0f2cce))
* update readme for creating argocd application [#77](#77) ([1973e32](1973e32))
* update readme for sealedsecrets [#78](#78) ([37982f6](37982f6))
* update readme with Sentry instructions [#76](#76) ([0b2f159](0b2f159))
* update with new name and overview of included features ([751b599](751b599))

### Refactors

* cleanup unneeded configs ([b339523](b339523))
* move argocd folder to k8s [#77](#77) ([7cd8425](7cd8425))
* move init backend manifest ([41de452](41de452))
* move shared manifests to module [#92](#92) ([890e3db](890e3db))
* remove argocd changes [#78](#78) ([c6d9978](c6d9978))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants