Skip to content

Latest commit

 

History

History
95 lines (73 loc) · 2.8 KB

File metadata and controls

95 lines (73 loc) · 2.8 KB

Test a feature request

Prerequisites:

Objectives:

Deploy manually a new deployment in a new environment

Create a new test environment:

humctl create env test --type development --from development

Because we just created this new test environment, we don't have any deployment in there yet:

humctl get deploy . --env test

Update the score.yaml file with the following changes:

...
containers:
...
    variables:
      ...
+      REDIS_ADDR: "${resources.my-redis.host}:${resources.my-redis.port},user=${resources.my-redis.username},password=${resources.my-redis.password}"
resources:
+ my-redis:
+   type: redis
  dns:
    type: dns
...

Let's deploy this new version of the Score file with an existing container image:

CONTAINER_IMAGE=$(humctl get deployment-set . -o yaml | yq '.entity.modules[].spec.containers[].image')

humctl score deploy -f score.yaml --env test --image ${CONTAINER_IMAGE} --wait

Once the deployment is done, let's check the diff between the two environments:

humctl diff sets env/test env/development

Also, let's open the new resource graph on this test environment and see that the Redis database is now provisioned:

humctl resources graph deploy . --env test

alt text

(Just a demo) See how an Ephemeral Environment can be created via a Pull Request

Important note: this section is just a demo, please see what your presenter is doing to illustrate this. You are not able to perform this specific section because you are not Owner in the GitHub Organization used during this workshop.

Create a new-feature branch:

git checkout -b new-feature

Commit your local changes in this new-feature branch:

git add score.yaml
git commit -m "Add Redis database"
git push -u origin new-feature

Create a dedicated Pull Request in GitHub:

gh pr create --title "Add Redis database" --body "Add Redis database"

Check the status of this Pull Request:

gh pr status

gh run list

Open this Pull Request in GitHub:

gh pr view --web

alt text

From there, let's highlight what happened, and what the associated GitHub Actions pipeline did.

<< Previous: Set up your local environment | Next: Review of the Platform setup >>