Swimlane Platform Installer Gu...
...
Automate Installation
Automate an Air-Gapped Existing Cluster Installation
9 min
this topic provides steps for automating an air gapped swimlane installation into an existing kubernetes cluster other requirements a private registry that hosts the initial containers is necessary for an airgapped existing cluster installation to automate this process the following files are also needed swimlane platform installer (spi) license file (ends with yaml ) swimlane license file (ends with lic ) swimlane offline package swimlane airgap bundle (ends with airgap ) 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 to and correctly setup on a system with access to the cluster for linux, download and untar the binary file curl ssl o https //get swimlane io/existing cluster/install/linux tar zxvf linux mv kots /usr/local/bin/kubectl kots for osx, download and untar the binary file curl ssl ohttps //get swimlane io/existing cluster/install/osx tar zxvf osx mv kots /usr/local/bin/kubectl kots push spi container images to your private registry push spi container images to your private registry with this code kubectl kots admin console push images \<path to offline installer package> \<your registry endpoint>/\<your registry name> \\ registry username \<your registry username> \\ registry password \<your registry password> swimlane installation and deployment after the spi kubectl add on has been installed, install swimlane with the following command kubectl kots install swimlane platform \\ namespace \<namespace> \ shared password \<spi admin console password> \ license file \<spi license> yaml \ config values \<spi config file> yaml \\ airgap bundle \<swimlane airgap bundle> airgap \\ kotsadm namespace swimlane platform \\ kotsadm registry \<your registry endpoint>/\<your registry name> \\ registry username \<your registry username> \\ registry password \<your registry password> port forward=false 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 spi config file docid\ xvnlrajyol06zdrvz8ov6 here is a basic version of the config file that you can use for an initial single node configuration apiversion kots io/v1beta1 kind configvalues metadata creationtimestamp null name \<swimlane namespace> spec values is ha value "0" mongo admin user password value \<base64 encoded string> mongo admin user password confirm value \<base64 encoded string> mongo swimlane user password value \<base64 encoded string> mongo swimlane user password confirm value \<base64 encoded string> swimlane database encrypt key value \<base64 encoded string> swimlane database encrypt key confirm value \<base64 encoded string> swimlane enable ingress value "1" swimlane hostname value \<swimlane hostname> swimlane ingress annotations value | \<insert ingress annotations here> \<insert ingress annotations here> swimlane storage class value \<storage class name> 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 kubectl wait l statefulset kubernetes io/pod name=swimlane sw mongo 0 for=condition=ready pod namespace \<swimlane namespace> timeout=240s export sw api=$(kubectl get po n \<namespace> no headers o custom columns="\ metadata name" | grep i api) kubectl wait for=condition=ready pod $sw api n \<namespace> timeout=240s 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 curl klv x post https //\<swimlane url>/api/settings/install \\ header "content type application/json" \\ d '{"mailsettings" {}, "password" "\<admin password>","confirmpassword" "\<admin password>", "databaseencryptionkey" "", "swimlaneurl" "https //\<swimlane url>", "license" \<generated json data>, "adminusername" "\<admin username>", "adminemail" "\<admin email>"}'