4 This tool was designed to help bootstrap the process of charm creation.
5 It should help beginners to have a charm working in a matter of minutes.
7 The charm generator takes as input an initialized charm and some scripts
8 or description of HTTP requests and transforms it into a functional charm
9 with all the metadata filled in.
11 The main flow is the following:
13 1) charm create <name of the charm>
14 2) copy the scripts or the requests definition into a specific directory
18 What types of charms can be generated?
19 --------------------------------------
21 Currently, the Charm Generator only supports Ansible scripts.
23 In the roadmap, the following charms are planned:
29 How to run the Charm Generator?
30 -------------------------------
32 To run the Charm Generator, you should do the following steps:
34 1) Download the OSM Devops git repository
35 2) Install the requirements.txt
36 3) Run the generator.py in the charm that you want to generate
38 The only mandatory parameter is what type of charm you want to
42 * HTTP Requests (--http) - not implemented
43 * SOL002 Requests (--sol002) - not implemented
44 * Python Scripts (--scripts) - not implemented
46 There are some recommended parameters, such as:
48 * Summary - summary of what the charm does (--summary)
49 * Maintainer - the name and email of the maintainer (--maintainer)
50 * Description - description of what the charm does (--description)
51 * Company - company name to be include in the license headers (--company)
52 * Email - email of the company/developer to be included in the license headers (--email)
54 Specifics of the Ansible option
55 -------------------------------
57 In order to create an Ansible charm, you need to create a directory
58 inside the charm and name it playbooks. Inside that directory, you
59 should put all the playbooks that are going to be executed in the charm.
61 Note: the playbooks extension must be .yaml
63 Your charm should look like this before running the generator: