This example shows how to deploy an grpcbin service using Opta.
This directory contains:
.
├── env-aws.yaml # opta environment file for AWS
├── env-azure.yaml # opta environment file for Azure
├── env-gcp.yaml # opta environment file for GCP
└── grpcbin.yaml # opta service file
NOTE: Typically, the first step of the example would be to demonstrate how one may deploy the application locally but currently GRPC with opta does not function locally, and requires TLS set up in the cloud environments to function. If you have pressing need for this feature, please let us know in our slack channel
- Select the target environment
# pick one export ENV=[aws/azure/gcp] # edit the env file to specify where to deploy (Account information) open env-${ENV}.yaml
- Create the environment infrastructure (VPC, Kubernetes...)
opta apply --auto-approve -c env-${ENV}.yaml # when done, find load_balancer_raw_dns or load_balancer_raw_ip in the output and save it export load_balancer=[Value from output]
- Complete the TLS and domain set up
- Deploy the service: push the image and deploy it to Kubernetes
opta apply --config grpcbin.yaml --auto-approve --env $ENV
- Test
curl http://${load_balancer}/hello # you can run any kubectl command at this point kubectl -n grpcbin get all
- Clean up
opta destroy --auto-approve --config grpcbin.yaml --env $ENV opta destroy --auto-approve --config env-${ENV}.yaml
NOTE: We are using opta apply
as opta deploy
is only needed when the image is set to AUTO
For more guidance, please reach out to us in our slack channel.