Helm for Container Deployments
Helm is called to replace the DeployHub default processing engine for performing container deployments. When DeployHub executes the release process, it will call the Helm Chart you have defined as your Custom Action at the Component level. DeployHub includes the version of the Helm chart as part of its overall configuration data.
Connecting a DeployHub Endpoint to your Kubernetes Cluster through Helm
DeployHub’s deployment engine comes pre-installed with Helm. For this reason you should use the deployment engine as the “localhost” Endpoint for your deployments. This Helm install on the “localhost” Endpoint needs to know how to connect to your Kubernetes Cluster. Mount your “.kube/config” file to the DeployHub deployment engine Docker container to provide the connection. The additional parameter to the docker run command for the DeployHub container exposes the Kubernetes config file to the Helm install in DeployHub. The following is an example of the additional parameter:
For more information on starting the DeployHub Container see:
- SaaS Sign-up and Reverse Proxy
- DeployHub Team On-Premise Installation
- DeployHub Pro On-Prem Installation
Helm and Custom Actions
Helm is called as a DeployHub Custom Action. To use Helm, you will need to import two Helm files as DeployHub Procedures and define them to your Custom Action. This Helm Custom Action can then be assigned to your Container Components. See Procedures and Functions and Customize Actions to learn more. The following steps will create your Helm Custom Action.
Step 1 - Download and Import the Helm scripts as Procedures
Download the the most current DeployHub Helm Procedures from the Ortelius Git Repo. There will be two:
WriteEnv2Toml.re: This Procedure takes all the attributes from DeployHub Environments, Applications, Endpoints and Components and writes them to a file readable by the Helm Procedure.
HelmUpgrade.re – This Procedure performs a Helm upgrade/install of the Helm Chart.
Step 2 - Create your Procedures
Once downloaded, you will need to Import the scripts into DeployHub as Procedures. To import these Procedures navigate to the Func/Procs Menu option on the left hand side of the DeployHub Main Menu panel. This will take you to the Functions and Procedures List View. From the Functions and Procedures List View select the Import option. The Import will bring you to your operating system “file open” dialog box for selecting the WriteEnv2Toml.re and HelmUpgrade.re files.
Next, select your “Global,” or highest level, Domain and upload the Procedure into DeployHub. If you select a lower level Subdomain you will restrict access. By defining it to your highest level Domain, all Users will be able to see the Procedures. Once you have both imported, you are now ready to create your Action.
Step 3 - Create your Action for Your Helm Procedures
Once you have imported your WriteEnv2Toml.re and HelmUpgrade.re files as Procedures, you can define your Action. Navigate to the Actions list view from the Actions menu option on the left hand side of the DeployHub Main Menu panel.
Use the +Add option to create a new Action for you Procedure. In the “Full Domain” field select your “Global” Domain. If you select a lower level Subdomain you will restrict access to this Custom Action. By defining it to your highest level Domain, all Users will be able to execute the process regardless of their SubDomain.
Name the new Action HelmChart (no spaces).
Now we are going to customize this Action. On the right hand side, you will see a list of Functions and Procedures you can choose from. Navigate to your Domain to find the WriteEnv2Toml.re and HelmUpgrade.re imported Procedures. Drag them onto the area under “Start”. The order should be WriteEnv2Toml, HelmUpgrade.
No Parameter fields are required for WriteEnv2File.
When you drag the HelmUpgrade Procedure onto the area under “Start” a pop-up dialog box will open for you to complete the following parameters:
|Title||Not Required||Name of the step in your deployment workflow.|
|Summary||Not Required||Enter a summary of this step.|
|RspFile||$RspFile||The results from the WriteEnv2Toml.re Procedure|
|Chart||$(Chart)||The Helm Chart to be used during the deployment|
|Release Name||$(component.name)||The name of the release|
At this point the Action is ready to be used by anyone with access (based on Domain and security options). Each Component that uses the Action will need to define specific values. Because this new Action is reusable, no Component variables are defined at the Action level.
Assign the HelmChart Action to a Component
Create your new Component from the Component Dashboard. See Defining Components. For each container Component you will need to define the variable values. Values are specified when you create a new container Component. Values will override those defined at the Application or Environment level. The values from DeployHub will be passed along to Helm’s values.yml file at execution time. For more information on defining your container Component see Container Specific Data Definition.