Checklist to maintain the quality of the IBM Cloud open source repository for Schematics. Follow the do's and don'ts to publish your repository in https://github.com/Cloud-Schematics.
Some of the must do
and should have
task for the Terraform templates are:
- Create Terraform template by using Terraform version1.0 or higher. For latest releases, refer to IBM Cloud provider.
- Ensure the Terraform related files such as
main.tf
,versions.tf
, etc., are placed in a root folder. - Ensure your repository contains
versions.tf
to run the required Terraform version. Forversions.tf
, refer to sample versions tf file. - Ensure pre-commit hooks are executed to inspect your code meets Terraform standards. Refer to sample repository that contains pre-commit hook.
- Prepare
README.md
that explains the title, short description, version requirements, about examples, modules, prerequisites, input and output variables with description, steps to run the example or modules, verification, troubleshooting tips, and reference from your repository. For more information, see README template. - Ensure your repository uses Terratest framework to validate your Terraform resources and data source to provision. Refer to sample validated Terraform repository to run Terratest.
- [Optional] Use IBM Cloud Provider for Terraform modules for the simple configuration of your infrastructure. For more information, about IBM Cloud Provider for Terraform modules, see Terraform getting started module.
- Ensure the variables and outputs must have one or two sentence descriptions that explains the purpose of the variables.
- Ensure your repository contains gitignore for any files that are not tracked by git remain untracked.
- Add required license file for your template.
- Run secrets manager test by using detect secret tool.
- Describe your template in the About settings section.
- Provide the search keyword in the Topics for your template in the settings section.
- Currently templates having complex data types are not supported to onboar into private catalog.
- Migrate your template to the latest versions. For example, migrate repository templates using Terraform v0.11 to Terraform v0.13 or higher.
Release tags
- Tags are used to identify template versions. Release tag names must be a semantic version, which can optionally be prefixed withv
. For example, v1.0.0.- Archive your template in a
.tgz
file extension format to onboard to your private catalog. The size of the.tgz
must be<=40MB
.
Note If you .tgz file size if greater than 40 MB, Userm -rf .git .gitignore
command to reduce the size of the.tgz
file and createtar czfv <reponame>.tgz .
. - Run a detect secrets to monitor and remove the secret leaks within your repository. To run the detect secrets, you need to install detect secret CLI tool, scan detect secrets
detect-secrets scan --update .secrets.baseline
, and audit detect secretsdetect-secrets audit .secrets.baseline
to check your respository do not contain the secrets.
- Add tags for your template to ease user search operation.
- Assume having a reference for the steps is good enough. The CLI steps and link to the API/SDK references if any, to be provided for the example.
- Add any secret, sensitive data in files, and password values of the parameters.
Some of the must do
and should have
task for the Ansible actions repositories are:
- Create the template by using the latest version of the Ansible.
- Prepare
README.md
that explains the title, short description, version requirements, about examples, modules, prerequisites, input and output variables with description, steps to run the example or modules, verification, troubleshooting tips, and reference from your repository. For more information, see README template. - Create an Ansible playbook templates by using Schematic action standard. For sample template on Schematic action creation, see Sample Ansible playbook templates for Schematics actions.
- Automate your Action templates. For more information, about using both Terraform and Action template, see Provisioning a LAMP stack on Virtual Servers for VPC to setup the infrastructure in Schematics.
- Ensure your repository contains gitignore for any files that are not tracked by git remain untracked.
- Ensure the variables and outputs must have one or two sentence descriptions that explains the purpose of the variables.
- Run secrets manager test by using detect secret tool.
- Add required license file for your template.
- Describe your template in the About settings section.
- Provide the search Topics for your template in the settings section.
- Archive your template in a
.tgz
file extension format to onboard to your private catalog. The size of the.tgz
must be<=40MB
.
Note If your .tgz file size if greater than 40 MB, Userm -rf .git .gitignore
command to reduce the size of the.tgz
file and createtar czfv <reponame>.tgz .
. Release tags
- Tags are used to identify template versions. Release tag names must be a semantic version, which can optionally be prefixed withv
. For example, v1.0.0.- Run a detect secrets to monitor the secret leaks within your repository. To run the detect secrets, you need to install detect secret CLI tool, scan detect secrets
detect-secrets scan --update .secrets.baseline
, and audit detect secretsdetect-secrets audit .secrets.baseline
to check your respository do not contain the secrets.
- Add tags for your templatet to ease user search operation.
- Assume having a reference for the steps is good enough. The CLI steps and link to the API/SDK references if any, to be provided for the example.
- Add any secret, sensitive data in files, and password values of the parameters.