Create

Create objects in this order. Organization > Project > Environment > Remote State > Cluster > Service

Help

planeo create help

Create organization

planeo create organization --name <organization name>

Note: Please avoid using space in your organization name

example:

planeo create organization --name exampleorg

creating organization: exampleorg
organization created Successfully.

Create project

planeo create project --name <project name>

Note: Please avoid using space in your project name

example:

planeo create project --name analytics

creating project: analytics
project created successfully.

Create environment

planeo create environment --name <environment name> --kind permanent --project <project name>

Note: Please avoid using space in your environment name

example:

planeo create environment --name dev --kind permanent --project analytics

creating environment: dev, Kind=permanent, Project=analytics
environment created successfully.

Create remote state

planeo create remotestate --account-id <account id> --env <environment name> --project <project name> --region <region> --role-arn <role_arn>

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!

Create cluster

planeo create cluster --name <cluster name> --cidr <vpc cidr> --env <environment name> --kind eks --project <project name> --region <region> --domain <domain name>

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

planeo create service --build-and-deploy --name <service name> --runtime-env <python/nodejs/go> --runtime-version <version> --kind web --git-repo <git repository url> --repo-type <public/private> --git-branch <git branch name> --port <service port> --cluster <cluster name> --project <project name> --env <environment name>

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

Last updated