Language: Python Platform: Openstack Liberty
Implement virtual cluster orchestrator. Cluster consists of:
- Single master node
- Multiple worker nodes (number is specified by user, see below)
- Private network between nodes
- Router, that connects private network to public
- Floating IP address assigned to master node in public network
| M | | W | | W | Virtual machines (M - master, W - worker)
| | | --------------- Private network | --- ( x ) Virtual router (DNAT rule is inserted for M) --- | --------------- External public network
Requirements:
- Orchestrator should use Keystone API (for authentication) and Heat API (for orchestration).
- Heat API endpoint should be resolved from Keystone service catalog rather than hardcoded.
- Orchestrator CLI arguments: a) Number of worker nodes to deploy. b) Heat stack name.
- Orchestrator config file: a) image name and flavor for master node. b) image name and flavor for worker node. c) attributes for virtual networking, i.e. CIDR, public network ID. d) Keystone API endpoint.
- Use oslo.config module for parsing CLI arguments and config file.
- Keystone authentication credentials should be passed as environmental variables.
- At the end of execution orchestrator should print assigned Floating IP address of master node to stdout.
Example: $ ./orchestrator.py -n 3 mycluster Master node Floating IP: 192.168.0.10