Skip to content

Commit 3ee7778

Browse files
author
Matt Pryor
authored
Clarify dev environment usage in docs (azimuth-cloud#162)
* Clarify dev environment usage in docs * Add tip for producing unique values
1 parent b958d7b commit 3ee7778

File tree

1 file changed

+72
-40
lines changed

1 file changed

+72
-40
lines changed

docs/developing/index.md

Lines changed: 72 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -4,58 +4,52 @@ An Azimuth deployment consists of several interdependent components, some of whi
44
Azimuth-specific and some of which are third-party components. Plugging code under
55
development into such a system can be tricky, making development difficult and slow.
66

7-
## Developing Azimuth components
8-
9-
Azimuth has a number of components, mostly written in Python:
7+
## Deploying a dev instance
108

11-
* [Azimuth API and UI](https://github.com/stackhpc/azimuth) - user-facing API and UI
12-
* [Azimuth CaaS operator](https://github.com/stackhpc/azimuth-caas-operator) - Kubernetes operator implementing CaaS functionality
13-
* [Azimuth CAPI operator](https://github.com/stackhpc/azimuth-capi-operator) - Kubernetes operator implementing Kubernetes and Kubernetes App functionality
14-
* [Azimuth identity operator](https://github.com/stackhpc/azimuth-identity-operator) - Kubernetes operator implementing platform identity
15-
* [Zenith](https://github.com/stackhpc/zenith) - secure, tunnelling application proxy used to expose platform services
16-
* [Cluster API addon provider](https://github.com/stackhpc/cluster-api-addon-provider) - addons for Cluster API clusters
17-
* [Cluster API janitor for OpenStack](https://github.com/stackhpc/cluster-api-janitor-openstack) - resource cleanup for Cluster API clusters on OpenStack clouds
9+
In order to develop Azimuth, you first need a running Azimuth instance.
1810

19-
It is useful to develop these components in the context of a running Azimuth installation,
20-
as they have dependencies on each other.
11+
Each developer should have their own independent instance of Azimuth for development,
12+
as during development they will make changes to the running Azimuth components that may
13+
conflict with or break things for others.
2114

22-
To enable this, Azimuth uses [Tilt](https://tilt.dev/) to provide a developer environment
23-
where code under development is automatically built and injected into a live system that
24-
you can interact with. Tilt provides a dashboard that can be used to drill down into
25-
build failures and the logs of the components under development.
15+
### Creating a dev environment
2616

27-
![Azimuth in Tilt](tilt-interface.png)
17+
Azimuth supports using a single [configuration environment](../environments.md) to deploy multiple
18+
independent Azimuth instances. When
19+
[activating an environment](../deployment/#activating-an-environment), a unique instance name
20+
can be given as a second argument to the `activate` script, e.g.:
2821

29-
### Prerequisites
30-
31-
In order to use Tilt to develop Azimuth, the following tools must be available on your
32-
development machine (in addition to those required to install Azimuth itself):
33-
34-
* The [Tilt CLI](https://docs.tilt.dev/install.html)
35-
* A `docker` command, e.g. [Docker Desktop](https://docs.docker.com/desktop/)
36-
* The [kubectl command](https://kubernetes.io/docs/tasks/tools/#kubectl)
37-
* The [Helm CLI](https://helm.sh/docs/intro/install/)
22+
```bash
23+
# Activating an environment with a unique instance name
24+
source ./bin/activate my-environment jbloggs
25+
```
3826

39-
For developing the Azimuth UI, the following are also required:
27+
In order for an environment to be used in this way, it must be specially prepared to be more
28+
dynamic than an environment that you would use for staging or production. In particular, only
29+
[single node deployments](../configuration/02-deployment-method.md#single-node) are usable in
30+
this way, as HA deployments do not support dynamically allocating a floating IP for the ingress
31+
controller.
4032

41-
* [node.js](https://nodejs.org)
42-
* The [Yarn Classic](https://classic.yarnpkg.com/lang/en/docs/install/) package manager
33+
It is recommended that you create an environment in your Azimuth configuration repository
34+
for doing Azimuth development on your cloud. This environment should include any site-specific
35+
customisations that are required, usually by building on a
36+
[site mixin](../environments.md#using-mixin-environments). The
37+
[demo environment](https://github.com/stackhpc/azimuth-config/tree/devel/environments/demo)
38+
is a good starting point for this, as it is designed to be flexible and dynamic.
4339

44-
### Deploying a dev instance
40+
!!! tip "Producing unique values in your Azimuth configuration"
4541

46-
To use Tilt for developing Azimuth components, you first need a running Azimuth instance.
47-
48-
Each developer should have their own independent instance of Azimuth as Tilt will make
49-
changes to the running Azimuth components, based on the code under development, that may
50-
disrupt or break things for others.
42+
The Ansible variable `azimuth_environment` contains the unique instance name, and
43+
can be used in other variables in your configuration where a unique value is required
44+
for each developer environment.
5145

52-
!!! tip
46+
!!! warning "Developers should use their own application credential"
5347

54-
A single node deployment, e.g. a [demo deployment](../try.md), is sufficient for developing
55-
the Azimuth components.
48+
You should not include an application credential in your development environment.
49+
Instead, each developer can use their own application credential as described in the
50+
next section.
5651

57-
You may wish to maintain a [development environment](../environments.md) containing
58-
site-specific customisations.
52+
### Using the dev environment
5953

6054
The following instructions assume that your Azimuth configuration contains a developer environment
6155
called `dev`. It is assumed that you have your Azimuth configuration checked out and that you have
@@ -81,6 +75,44 @@ ansible-galaxy install -f -r requirements.yml
8175
ansible-playbook stackhpc.azimuth_ops.provision
8276
```
8377

78+
## Developing Azimuth components
79+
80+
Azimuth has a number of components, mostly written in Python:
81+
82+
* [Azimuth API and UI](https://github.com/stackhpc/azimuth) - user-facing API and UI
83+
* [Azimuth CaaS operator](https://github.com/stackhpc/azimuth-caas-operator) - Kubernetes operator implementing CaaS functionality
84+
* [Azimuth CAPI operator](https://github.com/stackhpc/azimuth-capi-operator) - Kubernetes operator implementing Kubernetes and Kubernetes App functionality
85+
* [Azimuth identity operator](https://github.com/stackhpc/azimuth-identity-operator) - Kubernetes operator implementing platform identity
86+
* [Azimuth schedule operator](https://github.com/stackhpc/azimuth-schedule-operator) - Kubernetes operator implementing platform scheduling
87+
* [Zenith](https://github.com/stackhpc/zenith) - secure, tunnelling application proxy used to expose platform services
88+
* [Cluster API addon provider](https://github.com/stackhpc/cluster-api-addon-provider) - addons for Cluster API clusters
89+
* [Cluster API janitor for OpenStack](https://github.com/stackhpc/cluster-api-janitor-openstack) - resource cleanup for Cluster API clusters on OpenStack clouds
90+
91+
It is useful to develop these components in the context of a running Azimuth installation,
92+
as they have dependencies on each other.
93+
94+
To enable this, Azimuth uses [Tilt](https://tilt.dev/) to provide a developer environment
95+
where code under development is automatically built and injected into a live system that
96+
you can interact with. Tilt provides a dashboard that can be used to drill down into
97+
build failures and the logs of the components under development.
98+
99+
![Azimuth in Tilt](tilt-interface.png)
100+
101+
### Prerequisites
102+
103+
In order to use Tilt to develop Azimuth, the following tools must be available on your
104+
development machine (in addition to those required to install Azimuth itself):
105+
106+
* The [Tilt CLI](https://docs.tilt.dev/install.html)
107+
* A `docker` command, e.g. [Docker Desktop](https://docs.docker.com/desktop/)
108+
* The [kubectl command](https://kubernetes.io/docs/tasks/tools/#kubectl)
109+
* The [Helm CLI](https://helm.sh/docs/intro/install/)
110+
111+
For developing the Azimuth UI, the following are also required:
112+
113+
* [node.js](https://nodejs.org)
114+
* The [Yarn Classic](https://classic.yarnpkg.com/lang/en/docs/install/) package manager
115+
84116
### Configuring a container registry
85117

86118
Azimuth's Tilt configuration looks for a file called `tilt-settings.yaml` that defines settings

0 commit comments

Comments
 (0)