Stemcells
BOSH stemcells in anynines-deployment are configurable via the IaaS config. A list of stemcells is configured 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 them referenced
anywhere they are needed.
It also allows one type of stemcell to be used in the services and another in the Service Instances. Alternatively, Ops files can be used to configure a certain type of stemcell for a particular component. This provides a high degree of control while preserving DRY principles by using sensible defaults.
Currently, Ubuntu Jammy is the default stemcell for all services and Service Instances. This can be changed to any
OS supported by anynines-deployment.
Currently Supported Stemcells
Currently, only the Ubuntu Jammy stemcell is supported on compatible CPIs.
The following versions have been tested on the anynines test system:
| Linux stemcells | Versions | Comment |
|---|---|---|
| Ubuntu Jammy | 1.1364 | |
| Ubuntu Bionic | 1.204 | Unsupported |
| Ubuntu Xenial | 621.125 | Unsupported |
Changing the Default Stemcell
YAML anchors are used to create a reference to a particular stemcell and use that reference throughout the IaaS config file. The string &a9s-stemcell-default can be found in the IaaS config file (example: config/iaas-config.yml.example) and can be moved to another stemcell. A different stemcell can also be introduced 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 that was configured.
An example IaaS config:
iaas:
stemcells:
ubuntu-jammy: &a9s-stemcell-default
os: ubuntu-jammy
alias: ubuntu-jammy
version: "1.1364"
url: https://storage.googleapis.com/bosh-aws-light-stemcells/1.1364/light-bosh-stemcell-1.1364-aws-xen-hvm-ubuntu-jammy-go_agent.tgz
sha1: 498a8befc4fd2db5b99a1639fb2525c8eb9c021a
Such a stemcell can then be referenced as follows:
logme2_service:
stemcells:
service: *a9s-stemcell-default
If a different stemcell or even stemcell version is needed for the Service Instances in particular, an Ops file can be used to achieve this. An example is available in ops/replace-stemcell-template-uploader.yml. The Ops file might need to be adjusted to the specific environment's needs.
Example IaaS Config
The following YAML text is an example IaaS configuration. It introduces a stemcell (Ubuntu Jammy) and allows referring
to it by using a YAML anchor &a9s-stemcell-default.
iaas:
stemcells:
ubuntu-jammy: &a9s-stemcell-default
os: ubuntu-jammy
alias: ubuntu-jammy
version: 1.1364
sha1: 498a8befc4fd2db5b99a1639fb2525c8eb9c021a
In order to refer to them, a YAML alias can be used:
iaas:
data_service:
stemcell: *a9s-stemcell-default
Once the anchors and an alias are in place, stemcells can be referred to 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:
...