Automate an Online Existing Installation
This topic provides steps for automating an online Swimlane installation into an existing Kubernetes cluster.
Other Requirements
To automate this process the following files are needed:
- Swimlane Platform Installer (SPI) license file (ends with .yaml)
- Swimlane license file (ends with .lic)
SPI Kubectl Add-on Installation
In order to automate a Swimlane installation in to an existing cluster, the SPI Kubectl Add-on must be downloaded and correctly setup on a system with access to the cluster:
For Linux, download and untar the binary file:
For OSX, download and untar the binary file:
Swimlane Installation and Deployment
After the SPI Kubectl Add-on has been installed, install Swimlane with the following command:
Creating an SPI Config File
The <SPI Config File>.yaml file is a YAML-formatted file that outlines the specifications of a Swimlane deployment. You can get the .yaml file from a previously configured installation of SPI or by creating a new file manually.
To obtain a file from an previously configured SPI install, run the following command from a system with access to the Kubernetes API and the SPI Kubectl Add-on installed:
kubectl kots download swimlane-platform -n <namespace>
This command downloads a copy of the entire SPI deployment specifications to a local folder named swimlane-platform.
The config file is located at ./swimlane-platform/upstream/userdata/config.yaml in the downloaded folder.
To create the file manually, review the configurable options available in the Existing Cluster SPIExisting Cluster SPI.
Here is a basic version of the config file that you can use for an initial single-node configuration:
Swimlane Initial Login
It will take a few minutes for Swimlane to initialize all of the required components. However, automation can effectively 'wait' for a ready state by waiting for a ready status from different parts of the deployment. There are multiple ways to accomplish this wait period, the following code block is just one example:
Next, continue with the Swimlane install by creating the initial administrative user.
Using your Swimlane license .lic file, first generate the necessary license block for the API call with a curl command:
curl -kLv -X POST https://<Swimlane URL>/api/settings/license/upload -H 'Content-Type: multipart/form-data' -F file=@<Swimlane License File>.lic
Then, to create the initial administrative user, insert the returned JSON into the following curl command: