Create a Custom Component

Rick Richardson Updated by Rick Richardson

A custom component is a stack component that is created and maintained by you, the user. These components can be integrated into any Stack Template in the AgileStacks SuperHub. A stack template is a group of components managed as a single deployment unit. You can manage, configure, and implement change control for multiple components using the SuperHub. The following are examples of infrastructure-as-code languages that can be used to implement custom components:

  • Terraform
  • AWS CloudFormation
  • Azure Resource Manager (ARM)
  • Ansible
  • Chef
  • Kubernetes Operator
  • Helm
  • Shell
  • Make

Component registration on the Control-plane

To create a custom component through the control-plane follow the steps below:

  1. Open Components > Create
  1. Enter component Name, Title and choose a Category the component belongs to. Users are allowed to create their categories
  2. If this is your first component, a new Git repository must be created for a source code of the component. To avoid issues with permissions, currently we only support Agile Stacks hosted Git Service (repositories from Github or other external sources can't be added). Click + Create new. Git repository name is derived from component's name and can't be changed. NOTE: When a new Git repository is created, Agile Stacks generates and pushes Custom Component skeleton (example) to the repository. It's a simple Kubernetes service with UI, that contains a few pods and an ingress.
  3. If you created Custom Components previously, you can choose one of the existing Git repositories (a single repository can contain multiple custom components). In this case you must specify a directory name in GIT sub path field within the existing Git repository that will contain source code of the component.
  4. Configure who can access the component in Permissions section. Members of the groups who have Admin permissions can modify component meta information, modify access rights to the component, see and choose the component on the Happy Meal, and deploy it. The groups with Write permissions can see and choose the component on the Happy Meal, and deploy it. The groups with Read permissions can see the component on the Happy Meal, however can't deploy it.
  5. Optionally, you can provide a short component description in the Brief field and a long description in the Description field. In addition, Component Logo (valid URL), Version, Maturity, License and Tags can be entered on this page.
  6. Click Save button.

By default Custom Component repository contains a source code of an example service. Control-plane users are required to replace the example with the source code of their component. See Create and deploy custom component Kafka section below for more details about editing the source code of custom components.

Create and deploy an overlay template with Custom Component

In the previous step we have created a Custom Component. Now the component can be selected from the Catalog and added to a Stack Template:

  1. Open Stack Templates > Create
  2. Enter template Name, choose Stack type Overlay
  3. The Custom Component created during the previous step should be visible and available for selection. Select the component. NOTE: By default components with alpha maturity are not shown. To see alpha components on the Happy Meal, adjust filter settings.

  1. Click Save for later
  2. Click Deploy
  3. Select On platform and choose Platform Stack where you are going to deploy the template. Type Name.
  4. Click Deploy

Create and deploy custom Kafka component

To deploy an example custom component Apache Kafka:

  1. Clone the custom component repository.
  2. Change to the directory where you cloned the component and delete all existing example files.
  3. Check out Apache Kafka example repository.
  4. Copy the following files from Apache Kafka example to the repository of your custom component:
    • hub-component.yaml Automation Hub deployment manifest, that describes a Custom Component. More details are available in the commented lines of the example file or in documentation
    • Makefile: Custom component implementation in Make. Helm is used to install Apache Kafka release. See commented lines of the Makefile for more information
    • values.yaml.template Kafka Helm chart configuration template. The default template engine is curly for ${}, the others are mustache and commentary, respectively. For more information see templating documentation
  5. Commit & push the example files to the git repository.
  6. Create a new overlay stack template, that contains the custom component. For more information, please see Create an overlay template with Custom Component section above.
  1. Deploy the overlay template to the platform stack.

Like what you see? Request a demo today!

How did we do?

Components, Templates and Stacks

Create a Stack Template