upcmd / up

UP - Ultimate Provisioner CLI
https://upcmd.netlify.app/
MIT License
50 stars 4 forks source link

execution profile to help turn CI/CD task setup to be no hard code environment settings and GUI click #3

Closed stephencheng closed 4 years ago

stephencheng commented 4 years ago

Propose to add this feature:

showcase https://github.com/upcmd/up/blob/master/tests/functests/c0153.yml

So far, we can use an instanceid as context id to select what set of configuration we want to use, nomally they are categorized by global configuration, environment group configuration and individual context instance, for example as below:

global\_
        |_nonprod
            |_dev
            |_staging
        |_prod
            |_prod

You could use [ up ngo mytask -i dev ] to do deployment work aginst dev environment

However these configuration are more like server (backend) configuration. Most of time, we will have some other configurations, they are related to pipeline user input, for example:

All these settings are more like a user execution profile rather static and stable server environment configuration

In this case we could classify them all together into an execution profile, for example

global\_
        |_nonprod
            |_dev
                 \_dev1_test
                      ...
                 \_dev2_test:
                      ...
                 \_dev1_use_memcache:
                      |_ ENV var1
                      |_ ENV var2
                      |_ ENV var3
                      |_ vars:
                      |_ dvars:
                 \_dev2_no_db_recreat
                      ....
            |_staging
        |_prod
            |_prod

By using such a execution profile, the CI/CD tools does not need to handle the multiple environment variable entries and secure variable entries, all these could be handled by UPcmd. To trigger the pipeline, a code push is all needed.

This turns the audit to a precise git commit history so it is tracable to understand whose code has actually cause the problem, as the most of current CI/CD tools in the market, they are lack(weak) of this type of tracability

stephencheng commented 4 years ago

prefer solution 2

stephencheng commented 4 years ago

updated doco and tests: https://github.com/upcmd/up/blob/master/tests/functests/c0153.yml

stephencheng commented 4 years ago

doc: https://upcmd.netlify.app/user-interaction/exec_profile/