Skip to content

Commit 166c889

Browse files
authored
Merge pull request #895 from rackerlabs/more-deploy
docs: update more information about the deployment repo
2 parents 22e02e2 + 1408645 commit 166c889

File tree

6 files changed

+106
-21
lines changed

6 files changed

+106
-21
lines changed

docs/deploy-guide/deploy-repo.md

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Creating the Deploy Repo
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.

docs/deploy-guide/getting-started.md

+16-4
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ be consumed by different tools. It is recommended that one Deploy Repository
2121
is used per Management tier, see [Introduction](./welcome.md) for information
2222
on what this is.
2323

24+
### Layout
25+
2426
The layout of this repo will be something like:
2527

2628
```shell
@@ -53,13 +55,23 @@ The layout of this repo will be something like:
5355
7. The definitions of the hardware flavors that this cluster, which later you will see maps to a site. Notice it is different than staging.
5456
8. The cluster labeled as `global-prod` will have resources consumed here.
5557

56-
### Deploy repository permissions
58+
### Creation and Access
5759

58-
To get started, you'll need a Deploy Repository that you can commit to. This means you should have write access to this repository.
60+
To effectively utilize [GitOps][gitops] we will need a Deploy Repository.
5961

60-
For the deployment tool, [ArgoCD](./argocd.md), you'll need to set up read-only credentials. This allows ArgoCD to fetch the necessary data without making any changes to your repository. One way to achieve this is by using [GitHub Deploy Keys][gh-deploy-keys] or similar solutions.
62+
```bash
63+
# create my-deploy locally
64+
git init my-deploy
65+
# or clone one down
66+
git clone https://url/to/my-deploy
67+
```
6168

62-
[GitHub Deploy Keys][gh-deploy-keys] will work.
69+
This will need to be hosted somewhere that your ArgoCD instance in your
70+
Management Cluster will be able to access it. For ArgoCD, you will need
71+
to set up read-only credentials. This allows ArgoCD to fetch the
72+
necessary data being able to making any changes to your repository.
73+
One way to achieve this is by using [GitHub Deploy Keys][gh-deploy-keys]
74+
or check the [ArgoCD][argocd] documentation for other methods.
6375

6476
## UnderStack Repository
6577

docs/deploy-guide/gitops-install.md

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ git init uc-deploy
2929
git clone https://path/to/my/uc-deploy
3030
```
3131

32+
See [Deployment Repository](./getting-started.md#creation-and-access)
33+
3234
## Pre-deployment
3335

3436
Embracing GitOps and declarative configuration, we will define three

docs/deploy-guide/argocd.md renamed to docs/deploy-guide/management-cluster.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# ArgoCD
1+
# Management Cluster
22

33
The deployment of all the services into your Kubernetes cluster is handled
44
by [ArgoCD][argocd]. The [System Division](./welcome.md#system-division)
5-
defines the location where [ArgoCD][argocd] runs as the __Management__ cluster.
5+
defines the location where [ArgoCD][argocd] runs as the __Management__ role.
66
While it is possible to run ArgoCD from the same cluster that your services
77
will run in, it is not advisable outside of a development setup. The
88
approach that UnderStack uses to deploy it's services with ArgoCD is the

docs/deploy-guide/welcome.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ with a production best practices installation. Improvements are always welcome.
1414

1515
## System Division
1616

17-
A fully deployed UnderStack is divided into three distinct parts, or tiers,
17+
A fully deployed UnderStack is divided into three distinct parts, or clusters,
1818
that are referred to in the documentation as:
1919

2020
- Management
@@ -30,19 +30,19 @@ flowchart TD
3030
B[Global] --> E[Site N];
3131
```
3232

33-
A fully functioning system only needs one _Management_ tier, one _Global_
34-
tier and one or more _Site_ tier(s). In this configuration,
35-
the _Management_ tier is responsible for utilizing our [GitOps][gitops]
36-
tool, [ArgoCD][argocd] to deploy the expected state to all other tier.
37-
While the _Global_ tier is
33+
A fully functioning system only needs one _Management_ cluster, one _Global_
34+
cluster and one or more _Site_ cluster(s). In this configuration,
35+
the _Management_ cluster is responsible for utilizing our [GitOps][gitops]
36+
tool, [ArgoCD][argocd] to deploy the expected state to all other clusters.
37+
While the _Global_ cluster is
3838
responsible for hosting any services that are expected to exist only once
3939
for a whole system deployment such as the DCIM/IPAM tool. While the _Site_
40-
tiers will run the tools and services that need to live close to the
40+
clusters will run the tools and services that need to live close to the
4141
actual hardware.
4242

43-
In fact, one _Management_ tier can control multiple _Global_ tiers
44-
and their associated _Site_ tiers. We call the grouping of the _Global_
45-
tier and it's associated _Site_ tiers a _partition_. An example
43+
In fact, one _Management_ cluster can control multiple _Global_ clusters
44+
and their associated _Site_ clusters. We call the grouping of the _Global_
45+
cluster and it's associated _Site_ clusters a _partition_. An example
4646
would be a staging partition and a production partition.
4747

4848
```mermaid

mkdocs.yml

+9-5
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,15 @@ nav:
121121
- deploy-guide/welcome.md
122122
- deploy-guide/getting-started.md
123123
- Quick Start: deploy-guide/gitops-install.md
124-
- deploy-guide/argocd.md
125-
- deploy-guide/auth.md
126-
- deploy-guide/extra-sites.md
127-
- deploy-guide/add-remove-app.md
128-
- deploy-guide/override-openstack-svc-config.md
124+
- Preparing Our Deployment:
125+
- deploy-guide/deploy-repo.md
126+
- deploy-guide/auth.md
127+
- Starting the Deployment:
128+
- deploy-guide/management-cluster.md
129+
- Further Actions:
130+
- deploy-guide/extra-sites.md
131+
- deploy-guide/add-remove-app.md
132+
- deploy-guide/override-openstack-svc-config.md
129133
- 'Operator Guide':
130134
- operator-guide/index.md
131135
- 'OpenStack':

0 commit comments

Comments
 (0)