blob: 7f25710217436f51052e719bec2bed218754e364 [file] [log] [blame]
Dzmitry Stremkouski9dd6a1b2019-01-24 12:03:58 +01001Config drive creation tool
2==========================
3
4Script gives you an ability to build iso file for MCP instances.
5
6No, it is not for VCP instances. VCP instances config drives are configured by
7salt master. This script is intended only for building config drives for
8salt master and aptly mirror(for offline deployments).
9
10It has as many features as openstack cloud init format provides.
11You can use network_data.json vendor_data.json or not specify them at all.
12
13Networking part is a major part here.
14If you specify --network-data key with network_data.json it has highest priority
15on network set up, further network configuration is ignored and taken completely
16from json file you specify.
17This is how you can specify configuration for multiple interfaces if you wish.
18Without this file instance should have network configuration being done somehow
19and basic information is taken by passing:
20
21 --ip,
22 --netmask,
23 --gateway(optional, used for default route),
24 --interface(optional, default ens3 is used)
25
26argumetns.
27
28So in order to create iso file script should know these parameters and you need
29to pass them, otherwise one should implement logic based on write_files: section
30and catching SALT_MASTER_DEPLOY_IP or APTLY_DEPLOY_IP parameters which may
31change its names in time.
32In this case basic network configuration would be done and further actions, like
33setting up mtu, vlans, bridges, should be taken by config management tool (salt).
34
35You may want to skip network at all and just pass --skip-network, so instance
36would start with meta_data.json and user_data.
37
38Other parameters like MCP_VERSION are out of scope of this tool and are not
39going to be calculated. You need to edit yaml files before creating iso files
40and specify them on your own.
41
42Vendor metadata can be specified in native json format of openstack:
43- vendor_data.json (StaticJSON)
44
45If you want to add ssh key to your instance, you can specify it via --ssh-key
46parameter. If you are going to add multiple ssh keys, you need to use
47--ssh-keys parameter and specify path to a file in authorized_keys format which
48has them. If you specify both, they would be merged and deduplicated.
49
50If you want to have an access to your instance via ssh, you need to know default
51username for a cloud image.
52However you can specify it using --cloud-user-name parameter and ssh keys would
53be added to it. This user has sudo privileges.
54
55If you feel you need to get an access to your instance via serial tty, you can
56specify --cloud-user-pass parameter and user section would be updated.