|
| 1 | +# Preparing Our Deployment |
| 2 | + |
| 3 | +A deployment of UnderStack includes many different services, some of |
| 4 | +which will require specific configuration about your environment such |
| 5 | +as details about the hardware you will use or details on how you will |
| 6 | +connect to the hardware. |
| 7 | + |
| 8 | +These details will be accumulated in your Deployment Repository with |
| 9 | +some data being shared while most being scoped to a |
| 10 | +[Global cluster](./welcome.md#system-division) or |
| 11 | +a [Site cluster](./welcome.md#system-division). |
| 12 | + |
| 13 | +## Initial Structure |
| 14 | + |
| 15 | +To begin we will create our directory structure inside our Deployment Repository. |
| 16 | + |
| 17 | +```bash title="From the Deployment Repo" |
| 18 | +# where 'my-global' is the environment name you've used for your global cluster |
| 19 | +mkdir -p my-global/{manifests,helm-configs,inventory} |
| 20 | +# where 'my-site' is the environment name you've used for your site cluster |
| 21 | +mkdir -p my-site/{manifests,helm-configs,inventory} |
| 22 | + |
| 23 | +cat <<- EOF > my-global/deploy.yaml |
| 24 | +--- |
| 25 | +name: my-global |
| 26 | +understack_url: https://github.com/rackerlabs/understack.git |
| 27 | +understack_ref: v0.0.5 # replace with the tag or git reference you want to use |
| 28 | +deploy_url: git@github.com:my-org/my-deploy.git |
| 29 | +deploy_ref: HEAD |
| 30 | +EOF |
| 31 | + |
| 32 | +cat <<- EOF > my-site/deploy.yaml |
| 33 | +--- |
| 34 | +name: my-site |
| 35 | +understack_url: https://github.com/rackerlabs/understack.git |
| 36 | +understack_ref: v0.0.5 |
| 37 | +deploy_url: git@github.com:my-org/my-deploy.git |
| 38 | +deploy_ref: HEAD |
| 39 | +EOF |
| 40 | +``` |
| 41 | + |
| 42 | +For `dev` focused deployments, you do not need to specify the refs directly |
| 43 | +as they can be set on the ArgoCD cluster secret to allow more flexibility |
| 44 | +during testing. |
| 45 | + |
| 46 | +### manifests directory |
| 47 | + |
| 48 | +Inside of the `manifests` directory you'll create child directories that will |
| 49 | +be named after each application that we will deploy. These directories are |
| 50 | +expected to hold a `kustomization.yaml` as `kustomize` will be used to apply |
| 51 | +these manifests to your cluster. |
| 52 | + |
| 53 | +### helm-configs directory |
| 54 | + |
| 55 | +The `helm-configs` directory holds YAML files which are Helm `values.yaml` |
| 56 | +files that are used as additional values files that will be merged together |
| 57 | +by Helm. |
| 58 | + |
| 59 | +### inventory directory |
| 60 | + |
| 61 | +This directory contains an Ansible inventory file along with Ansible |
| 62 | +group_vars that are used as data by Ansible executions within the cluster |
| 63 | +to configure different services |
| 64 | + |
| 65 | +This directory contains an Ansible inventory file along with Ansible |
| 66 | +group_vars that are used as data by Ansible executions within the cluster |
| 67 | +to configure different services. |
0 commit comments