Note: This operation usually takes about 5 minutes. Keep an eye on your email for status. Do not move on creating a cluster until remote state creation is complete
example:
planeo create remotestate --account-id 123456789012 --env dev --project analytics --region us-east-1 --role-arn arn:aws:iam::123456789012:role/planeo_role
creating remote state: AccountId=123456789012, Region=us-east-1, Role=arn:aws:iam::123456789012:role/planeo_role, Project=analytics, Env=dev
request executed successfully.
deployment id: bc42fd6f-f3a9-434d-4628-316fe121d3d
remotestate creation in progress. hang tight, wait for our email!
Note: Please avoid using space in your cluster name
Also this operation usually takes about 45 minutes. Keep an eye on your email for status
Do not move on to creating a service until the cluster creation is complete
example:
planeo create cluster --name devcluster --cidr 10.0.0.0/16 --env dev --kind eks --project analytics --region us-east-1 --domain preprod.example.org
creating cluster: devcluster, Kind=eks, Domain=preprod.example.org, Region=us-east-1, Cidr=10.0.0.0/16, Project=analytics, env=dev
infra creation in progress. hang tight, wait for our email!
deployment id: 5411ae3c-7b80-4ad7-aaca-0b3f17e954a8
Create service
Prerequisites
Private git repositories will need planeo-git-ro-user and planeo-git-ro-pass to be set as secrets in your secrets manager (AWS)
If you bring your own helm chart, the service name must match the name of your chart in Chart.yaml
Note: Please avoid using space in your service name
Also this operation usually takes about 5 minutes. Keep an eye on your email for status
example:
planeo create service --build-and-deploy --name simple-python --runtime-env python --runtime-version 3.11.3 --kind web --git-repo https://github.com/planeodev/planeo-simple-python.git --repo-type public --git-branch main --port 8080 --cluster devcluster --project analytics --env dev
optional flag --runtime-env is set
optional flag --runtime-version is set
creating service: simple-python, Namespace=, Language=python, Version=3.11.3, Kind=web, GitURL=https://github.com/planeodev/planeo-simple-python.git, RepoType=public, GitBranch= main, ChartLocation=, ImageUri=, Port=8080, RunCommand=, EnvVars=[], ClusterName=devcluster, Project=analytics, Env=dev
request executed successfully.
deployment id: d2b3078f-7b97-4b5c-d99f-239caf3b92a1
service creation in progress. hang tight, wait for our email!
Below are several examples of how you can utilize service flags based on your use-case
--build-and-deploy( for webapps only, single repo, must be one of nodejs/go/python )
Use case - 1
You do not have a helm chart
You do not have a Dockerfile
GitOps is autoenabled. Your Git repo is monitored for changes.
Follow this page to set up GitOps for your repo
example-1:( without environment variables)
planeo create service --build-and-deploy --name simple-python --runtime-env python --runtime-version 3.11.3 --kind web --git-repo https://github.com/planeodev/planeo-simple-python.git --repo-type public --git-branch main --port 8080 --cluster devcluster --project analytics --env dev
example-2: ( with environment variables)
planeo create service --build-and-deploy --name simple-python --runtime-env python --runtime-version 3.11.3 --kind web --git-repo https://github.com/planeodev/planeo-simple-python.git --repo-type public --git-branch main --port 8080 --env-vars '[{"key":"db_user","value":"dbuser"},{"key":"db_pass","value":"dbpass"}]' --cluster devcluster --project analytics --env dev
Use case - 2
You do not have a helm chart
But have a Dockerfile
GitOps is autoenabled. Your Git repo is monitored for changes
Follow this page to set up GitOps for your repo
Note:--runtime-env and --runtime-version flags are not required
example-1: ( without environment variables )
planeo create service --build-and-deploy --name simple-go --kind web --git-repo https://github.com/planeodev/planeo-simple-go.git --repo-type public --git-branch main --port 8080 --cluster devcluster --project analytics --env dev
example-2: ( with environment variables )
planeo create service --build-and-deploy --name simple-go --kind web --git-repo https://github.com/planeodev/planeo-simple-go.git --repo-type public --git-branch main --port 8080 --env-vars '[{"key":"db_user","value":"dbuser"},{"key":"db_pass","value":"dbpass"}]' --cluster devcluster --project analytics --env dev
--deploy-only
Use case - 1
You have a helm chart
You have a Docker image ( image registry must be ECR and image tag :latest must exist )
--gitops true must be set. Your image registry (ECR) is monitored for changes
Follow this page to set up GitOps for your repo
example-1: ( without environment variables )
planeo create service --deploy-only --gitops true --name simple-nginx --namespace simple-nginx --chart-path charts/simple-nginx --git-repo https://github.com/planeodev/planeo-simple-nginx.git --repo-type public --git-branch main --cluster devcluster --project analytics --env dev --image-uri 123456789012.dkr.ecr.us-east-1.amazonaws.com/planeo-simple-nginx
example-2: ( with environment variables)
planeo create service --deploy-only --gitops true --name simple-nginx --namespace simple-nginx --chart-path charts/simple-nginx --git-repo https://github.com/planeodev/planeo-simple-nginx.git --repo-type public --git-branch main --cluster devcluster --project analytics --env dev --env-vars '[{"key":"db_user","value":"dbuser"},{"key":"db_pass","value":"dbpass"}]' --image-uri 123456789012.dkr.ecr.us-east-1.amazonaws.com/planeo-simple-nginx
Use case - 2
You have a helm chart ( must set $IMAGE_URI as image repository value in values.yaml of your helm chart )
You do not have a Docker image or Dockerfile
--gitops true must be set. Your Git repo is monitored for changes ( for webapps only, single repo, muse be one of nodejs/python/go )
Follow this page to set up GitOps for your repo
example-1: ( without environment variables)
planeo create service --deploy-only --gitops true --name simple-nodejs --namespace simple-nodejs --chart-path charts/simple-nodejs --git-repo https://github.com/planeodev/planeo-simple-nodejs.git --repo-type public --git-branch main --cluster devcluster --project analytics --env dev --runtime-env nodejs --runtime-version 20.18.1
example-2: ( with environment variables )
planeo create service --deploy-only --gitops true --name simple-nodejs --namespace simple-nodejs --chart-path charts/simple-nodejs --git-repo https://github.com/planeodev/planeo-simple-nodejs.git --repo-type public --git-branch main --cluster devcluster --project analytics --env dev --env-vars '[{"key":"db_user","value":"dbuser"},{"key":"db_pass","value":"dbpass"}]' --runtime-env nodejs --runtime-version 20.18.1
Use case - 3
Bring your own helm chart ( multiapp chart, chart location must contain templates directory, Chart.yaml and values.yaml files)
Bring your own image
GitOps is not enabled. Image building must be handled separately
example:
planeo create service --deploy-only --name demo-service --namespace demo-service --chart-path charts/demo-service --git-repo https://github.com/planeodev/planeo-demo-service.git --repo-type public --git-branch main --cluster devcluster --project analytics --env dev