This tool was designed to help bootstrap the process of charm creation. It should help beginners to have a charm working in a matter of minutes.
The charm generator takes as input an initialized charm and some scripts or description of HTTP requests and transforms it into a functional charm with all the metadata filled in.
The main flow is the following:
Currently, the Charm Generator only supports Ansible scripts.
In the roadmap, the following charms are planned:
To run the Charm Generator, you should do the following steps:
The only mandatory parameter is what type of charm you want to generate:
There are some recommended parameters, such as:
In order to create an Ansible charm, you need to create a directory inside the charm and name it playbooks. Inside that directory, you should put all the playbooks that are going to be executed in the charm.
Note: the playbooks extension must be .yaml
Your charm should look like this before running the generator:
.
├── config.yaml
├── icon.svg
├── layer.yaml
├── metadata.yaml
├── playbooks
│ ├── pb-1.yaml
│ ├── playbook2.yaml
│ └── playbook_3.yaml
├── reactive
│ └── testch.py
├── README.ex
└── tests
├── 00-setup
└── 10-deploy