Install the Scale Agent Plugin Using a Docker Image

Learn how to install the Armory Scale Agent plugin using a Docker image.

Halyard local config

  1. Create a custom service setting that mounts an empty volume inside Clouddriver for the plugin image. Add the following to your .hal/default/service-settings/clouddriver.yml file:

    kubernetes:
      volumes:
      - id: kubesvc-plugin-vol
        type: emptyDir
        mountPath: /opt/clouddriver/lib/plugins
    
  2. Define an init container for the plugin. In the deploymentConfigurations.name.deploymentEnvironment.initContainers section of your .hal/config, add the following:

    spin-cloudriver:
    - name: kubesvc-plugin
      image: docker.io/armory/kubesvc-plugin:<version>
      volumeMounts:
      - mountPath: /opt/plugin/target
        name: kubesvc-plugin-vol
    

    Be sure to use the plugin version compatible with your Spinnaker version.

  3. Add the plugin to your clouddriver-local.yml.

    spinnaker:
     extensibility:
       plugins:
         Armory.Kubesvc:
           enabled: true
           extensions:
             armory.kubesvc:
               enabled: true
       pluginsRootPath: /opt/clouddriver/lib/plugins
    kubesvc:
      cluster: kubernetes
    kubernetes:
      enabled: true
     # enable Clouddriver Account Management if you are using Spinnaker 1.28+
     account:
       storage:
         enabled: true
    
  4. Apply your changes by running hal deploy apply.

Validate plugin installation

  1. Confirm the plugin Docker image exists locally.

    docker images | grep kubesvc
    

    Output is similar to:

    armory/kubesvc-plugin     0.11.32
    
  2. Find the name of the new Clouddriver pod.

    kubectl -n spinnaker get pods
    
  3. Confirm the Clouddriver service is using the Docker image.

    kubectl -n spinnaker describe pod <clouddriver-pod-name> | grep Image:
    

    Output is similar to:

    Image:    docker.io/armory/kubesvc-plugin:0.11.32
    
  4. View the Clouddriver log to verify that the plugin has started.

    kubectl -n spinnaker logs deployments/spin-clouddriver | grep "Plugin"
    

    Output is similar to:

    org.pf4j.AbstractPluginManager      :  Plugin 'Armory.Kubesvc@0.11.32' resolved
    org.pf4j.AbstractPluginManager      :  Start plugin 'Armory.Kubesvc@0.11.32'
    io.armory.kubesvc.KubesvcPlugin     :  Starting Kubesvc  plugin...
    

Armory Operator or Spinnaker Operator

You can find the Kustomize file plugin-container-patch.yml in the spinnaker-patches-kustomize repo.

Change the value for metadata.name if your Armory CD service is called something other than “spinnaker”.

Then include the file under the patchesStrategicMerge section of your kustomization file.

patchesStrategicMerge:
  - <path>/plugin-container-patch.yml

Apply your changes.


Last modified March 3, 2023: (2d069084)