Stemcells
In order to manage BOSH stemcells in anynines-deployment, we've made stemcells
configurable via the IAAS config. We configure a list of stemcells in
iaas.stemcells
(see config/iaas-config.yml.example for an example).
This has the benefit of having all stemcells configured in one location and
having it referenced anywhere it's needed. It also allows to use one type of
stemcell in the services and another in the service instances. You can also use
ops files to configure a certain type of stemcells for a particular component.
This gives you a lot of control while preserving DRY
principles by using sensible defaults.
Currently, Ubuntu Bionic is the default stemcell for all services and service instances. This can be changed to any OS supported by anynines-deployment.
Note 1: In general, we no longer support Ubuntu Xenial.
Note 2: In the case of a9s Mariadb 10.1 service and a9s Billing component,
Ubuntu Bionic is not supported. Both use the stemcell Ubuntu Xenial at
version 621.125
as an exception.
Currently supported stemcells
We currently support the Ubuntu Bionic stemcells on supported CPIs.
We've tested the following versions on our test system:
Linux stemcells | Versions | Comment |
---|---|---|
Ubuntu Bionic | 1.88 | Except a9s MariaDB 10.1 |
Ubuntu Xenial | 621.125 | a9s MariaDB 10.1 |
Changing the default stemcell
We use YAML anchors to create a reference to a particular stemcell and use that reference throughout the IAAS config file. Please find the string &a9s-stemcell-default in the IAAS config file (example: config/iaas-config.yml.example) and "move" the string (a so called YAML anchor) to another stemcell. You can also introduce a different stemcell below the stemcell that uses this YAML anchor and assign it the YAML anchor &a9s-stemcell-default. After that, the default stemcell will be the one you configured.
An example for your IaaS config:
iaas:
stemcells:
ubuntu-xenial: &a9s-stemcell-xenial
os: ubuntu-xenial
alias: ubuntu-xenial
version: 621.125
sha1: 7724ce4272dd8f19b44584a17d31595eac7595e5
ubuntu-bionic: &a9s-stemcell-default
os: ubuntu-bionic
alias: ubuntu-bionic
version: 1.88
sha1: 1b09fe08ecb3eb653767e5c2fdaaa13a29783211
You can then reference such a stemcell like e.g.:
logme_service:
stemcells:
service: *a9s-stemcell-default
If you want to use a different stemcell or even stemcell version in your service instances only, you can do so by using an Ops file. Please find an example in ops/replace-stemcell-template-uploader.yml You might have to create your own copy of that Ops file with the correct values for your setup.
Adding stemcells
It is possible to add stemcells to anynines deployment's IAAS config by using an Ops file. See ops/add-stemcell-centos.yml for an example.
Example IAAS config
The following YAML text is an example IAAS configuration. It introduces two
stemcells (Ubuntu Xenial and Ubuntu Bionic) and allows referring to them by
using the YAML anchors (&a9s-stemcell-default
and &a9s-stemcell-xenial
).
iaas:
stemcells:
ubuntu-xenial: &a9s-stemcell-xenial
os: ubuntu-xenial
alias: ubuntu-xenial
version: 621.125
sha1: 7724ce4272dd8f19b44584a17d31595eac7595e5
ubuntu-bionic: &a9s-stemcell-default
os: ubuntu-bionic
alias: ubuntu-bionic
version: 1.88
sha1: 1b09fe08ecb3eb653767e5c2fdaaa13a29783211
In order to refer to them, you can use a YAML alias:
iaas:
data_service:
stemcell: *a9s-stemcell-default
Once you introduced the anchors and an alias, you can refer to these stemcells in different ways:
stemcells:
- os: ((iaas.data_service.stemcells.service.os))
alias: ((iaas.data_service.stemcells.service.alias))
version: ((iaas.data_service.stemcells.service.version))
- name: jobname
vm_type: small
instances: 1
azs: [z1, z2, z3]
stemcell: ((iaas.data_service.stemcells.service.alias))
jobs:
- { name: jobname, release: jobrelease }
properties:
...