Configure a private service catalog

Go to the Cycloid dashboards' organization management view:

Manage Organizations

A private service catalog is basically in a private git repository. So to access this repository we will first add new git credentials to access it into Cycloid credentials manager.

Click on the Credentials Key logo on your organization.

A popup should display your credentials, add a new one with type git.

Add Git Credential

Then click on the private service catalog logo Private Catalog to create a new one using the previously added git credential.

Private service catalog for your stacks

A stack is at least one git repository for the stack itself which can be private or public one. Then for the configuration of the stack you can use the same git repository with a dedicated branch or even a dedicated git repository for each environments.

In a git repository you can create one or several stacks. One at the root level. Or several stacks in subdirectories (maxdepth 1).

We usually create a CodeCommit repository with a branch stacks containing one or more private stack definition. And a branch config containing all stacks configuration for each environments.

To access to a CodeCommit repository you need to have an Amazon user on which you add a policy to access to CodeCommit and provide a public ssh key. See AWS Access Control Docs

To get the login for your user to clone a CodeCommit repository go to the Amazon console: AWS Console Users

Click on your user and go in the security credentials section, you should find the id under the CodeCommit section.

The first step is to get locally the git repository of the stack and the config with the CodeCommit user id.

git clone -b stack ssh://<userID><name_of_my_service_catalog> stack
git clone -b config ssh://<userID><name_of_my_service_catalog> config

In the stacks you should find at the top level the names of stacks. For example stack-infrastructure, stack-myProject, ...

In those stacks, you might have 3 directories:

  • Terraform: Contains terraform module definition (Terraform Modules), required variables and output of the stack.
  • Ansible: Default variables, roles and ansible playbook to use.
  • Pipeline: Template of the pipeline used only once at the project creation step. Concourse Triggers Docs
  • .cycloid.yml: A file containing the description and the configuration of the stack in the catalog Format of .cycloid.yml file.

In the config you might find at top level name of stacks. For example “infrastructure”, “myProject”, …

  • Terraform: The call of the module defined in the stack. The call contains all configuration variable of the module. You can imagine stack like a function definition and config like a call of that function specifying args.
  • Ansible: Contains usually variable file used by the playbook defined in the stack.

As described in Concept of a stack, during a deployment, the stack and the config are merged. That means you can put whatever you want in the stack or in the config. In some specific cases you should be able to override an entire stack only with config if you respect the same files path.

Stack Config So, all things required in the config are defined by the stack. You can create a stack which does not require any config, or you can create a stack which requires a lot of variables, template, files etc. from the config.