Migrate from Halyard to the Operator
This guide is for both the Armory Operator and the Spinnaker Operator. Armory Continuous Deployment and Spinnaker configuration is the same except for features only in Armory Continuous Deployment. Those features are marked
.
Before you begin
You need to decide if you want to overwrite the current Halyard deployment of Armory Continuous Deployment or create a test instance.
If you choose to overwrite your current instance, you need to take downtime to clean up the namespace that the Halyard-deployed Armory Continuous Deployment is in so Operator can deploy Armory Continuous Deployment without collision.
Alternately, you can use Operator to deploy Armory Continuous Deployment to a different namespace to test out the migration. You need to create a separate data store as well as separate Gate and Deck URLs for your test instance of Armory Continuous Deployment. Once you’ve verified that Operator has deployed your test configuration as you expected, decommission the Halyard-deployed instance of Armory Continuous Deployment. Change the data store config and URLs in the manifest that Operator used to deploy your test instance to match what your decommissioned instance used. Then redeploy.
The second method is preferred as it allows you to test everything before decommissioning Armory Continuous Deployment that you deployed using Halyard.
Migrate to Operator
This guide assumes you want to deploy Armory Continuous Deployment using a single SpinnakerSerivce.yml manifest file rather than Kustomize patches.
The migration process from Halyard to Operator can be completed in 7 steps:
-
Export configuration.
Copy the desired profile’s content from the
configfileFor example, if you want to migrate the
defaulthal profile, use the followingSpinnakerServicemanifest structure:currentDeployment: default deploymentConfigurations: - name: default <CONTENT>Add
<CONTENT>in thespec.spinnakerConfig.configsection in theSpinnakerServicemanifest as follows:spec: spinnakerConfig: config: <<CONTENT>>Note:
configis under~/.halYou can see more details in
spec.spinnakerConfig.config. -
Export Armory Continuous Deployment profiles.
If you have configured Armory Continuous Deployment profiles, you need to migrate these profiles to the
SpinnakerServicemanifest.First, identify the current profiles under
~/.hal/default/profiles.For each file, create an entry under
spec.spinnakerConfig.profiles.For example, you have the following profile:
$ ls -a ~/.hal/default/profiles | sort echo-local.ymlCreate a new entry with the name of the file without
-local.yamlas follows:spec: spinnakerConfig: profiles: echo: <CONTENT>You can see more details in
spec.spinnakerConfig.profiles. -
Export Armory Continuous Deployment settings.
If you configured Armory settings, you need to migrate these settings to the
SpinnakerServicemanifest also.First, identify the current settings under
~/.hal/default/service-settings.For each file, create an entry under
spec.spinnakerConfig.service-settings.For example, you have the following settings:
$ ls -a ~/.hal/default/service-settings | sort echo.ymlCreate a new entry with the name of the file without
.yamlas follows:spec: spinnakerConfig: service-settings: echo: <CONTENT>You can see more details in spec.spinnakerConfig.service-settings.
-
Export local file references.
If you have references to local files in any part of the config, like
kubeconfigFile, service account JSON files or others, you need to migrate these files to theSpinnakerServicemanifest.For each file, create an entry under
spec.spinnakerConfig.files.For example, you have a Kubernetes account configured like this:
kubernetes: enabled: true accounts: - name: prod requiredGroupMembership: [] providerVersion: V2 permissions: {} dockerRegistries: [] configureImagePullSecrets: true cacheThreads: 1 namespaces: [] omitNamespaces: [] kinds: [] omitKinds: [] customResources: [] cachingPolicies: [] oAuthScopes: [] onlySpinnakerManaged: false kubeconfigFile: /home/spinnaker/.hal/secrets/kubeconfig-prod primaryAccount: prodThe
kubeconfigFilefield is a reference to a physical file on the machine running Halyard. You need to create a new entry infilessection like this:spec: spinnakerConfig: files: kubeconfig-prod: | <CONTENT>Then replace the path in the config to match the key in the
filessection:kubernetes: enabled: true accounts: - name: prod requiredGroupMembership: [] providerVersion: V2 permissions: {} dockerRegistries: [] configureImagePullSecrets: true cacheThreads: 1 namespaces: [] omitNamespaces: [] kinds: [] omitKinds: [] customResources: [] cachingPolicies: [] oAuthScopes: [] onlySpinnakerManaged: false kubeconfigFile: kubeconfig-prod # File name must match "files" key primaryAccount: prodYou can see more details in spec.spinnakerConfig.files.
-
Export Packer template files (if used).
If you are using custom Packer templates for baking images, you need to migrate these files to the
SpinnakerServicemanifest.First, identify the current templates under
~/.hal/default/profiles/rosco/packer.For each file, create an entry under
spec.spinnakerConfig.files.For example, you have the following
example-packer-configfile:$ tree -v ~/.hal/default/profiles ├── echo-local.yml └── rosco └── packer └── example-packer-config.json 2 directories, 2 filesYou need to create a new entry with the name of the file following these instructions:
- For each file, list the folder name starting with
profiles, followed by double underscores (__) and at the very end the name of the file.
spec: spinnakerConfig: files: profiles__rosco__packer__example-packer-config.json: | <CONTENT>You can see more details in
spec.spinnakerConfig.files. - For each file, list the folder name starting with
-
Validate your Armory configuration if you plan to run the Operator in cluster mode:
kubectl -n <namespace> apply -f <spinnaker service manifest> --dry-run=serverThe validation service throws an error when something is wrong with your manifest.
-
Apply your SpinnakerService:
kubectl -n <namespace> apply -f <spinnaker service>
Help resources
- Armory Operator and Armory Continuous Deployment: contact Armory Support or use the Spinnaker Slack
#armorychannel. - Spinnaker Operator and Spinnaker: Spinnaker Slack
#kubernetes-operatorchannel.
Feedback
Was this page helpful?
Thank you for letting us know!
Sorry to hear that. Please tell us how we can improve.
Last modified February 15, 2023: (e9a54629)