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