-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Chef-client setup is handled by jobs instead of projects * Better use of Ruby gems and rd command * New option to re-fetch Knife keys after initial install * Cleanup duplicate code
- Loading branch information
Showing
32 changed files
with
1,200 additions
and
1,477 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,91 +1,90 @@ | ||
#Mission_Control | ||
# Mission_Control | ||
|
||
##Description | ||
## Description | ||
|
||
Mission_Control is a set of Rundeck projects that lets you `create / start / shutdown / destroy` virtual machines and containers. | ||
|
||
##Installation | ||
## Installation | ||
|
||
You will need to execute the `install` script to install all the required packages, gems and lay down the configuration files. | ||
First, edit the `vars` file with your parameters. Then, you will need to execute the `install` script to install all the required packages, gems and lay down the configuration files. | ||
```bash | ||
cbuisson@server:~/mission_control$ ./install | ||
``` | ||
To update the current configuration, edit the `vars` file and execute the `install` script again. The script can be run anytime. | ||
|
||
./install | ||
## Environment | ||
|
||
**Variables:** You can edit the `vars` file to reflect your current environment or what you want. You can paste your SSH public keys here. | ||
Mission_Control has been developed for a **brand new** install of **Ubuntu Xenial 16.04 LTS**. | ||
|
||
The install process will display a menu where you can choose to install any feature that you want. | ||
## Project: *kvm-control* | ||
|
||
##Environment | ||
Launch a new personalized KVM guest with: | ||
- SSH public keys importation | ||
- Automatic DNS entry creation | ||
- Static IP assignment | ||
- VNC accessibility | ||
- Chef-client installed and configured | ||
|
||
Mission_Control has been developed for **Ubuntu Xenial 16.04 LTS**. | ||
kvm-control will launch the KVM guests with a fully qualified domain name `.local`. Bind9 will be installed/used by default to dynamically manage the DNS A and PTR records. | ||
|
||
#*kvm-control* | ||
kvm-control was designed to work with Class C IPs. The netmask is hard coded to: **255.255.255.0**. | ||
|
||
You can choose to start a new virtual machine with an ISO or an Ubuntu Cloud image. | ||
You can also choose to start a new virtual machine with an ISO or an Ubuntu Cloud image. When an Ubuntu Cloud image is used to launch a new instance, the KVM guest will get a static IP. ISO's on the other hand, will get a DHCP IP. | ||
|
||
When an Ubuntu Cloud image is used to launch a new instance, the vm will get a static IP. ISO's on the other hand, will get a DHCP ip. | ||
### Network setup (Floating IP / NAT IP) | ||
|
||
###Network types: | ||
*Netmask*: kvm-control was designed to work with Class C IPs, therefore the netmask is hard coded to: 255.255.255.0 | ||
You can choose to assign a floating IP (public address accessible by external servers on the same local network) or a NAT IP (private address accessible by the hypervisor only) when launching a new KVM guest in Rundeck. The guest will be assigned a static IP and a VNC port. | ||
|
||
*Fqdn*: kvm-control will launch the KVM guests with a fully qualified domain name `.local`. Bind9 will be installed by default to dynamically manage the DNS A and PTR records. See `vars` file. | ||
Deleting the KVM guest will release both the IP (floating or NAT) and the VNC port. | ||
|
||
####Floating IPs | ||
### Floating IPs | ||
|
||
You will need to edit the `vars` file and add: | ||
You will need to edit the `vars` file and already have created a Linux bridge interface: | ||
|
||
- The interface out (**Must be br0** if using floating static IPs!) | ||
- A backend type (*MySQL or PostgreSQL*) | ||
- Interface out (**Must be named**: `br0`!) | ||
- Start IP (*i.e 192.168.0.1*) | ||
- End IP (*i.e 192.168.0.100*) | ||
- Gateway IP (*i.e 192.168.0.254*) | ||
|
||
Mission_Control will assign floating IPs to the KVM guests. Those floating IPs should be able to reach the hypervisor's IP and the gateway. You need to specify a floating IP range for the guests and a gateway to route out. | ||
|
||
**NAT IPs**: | ||
|
||
By default Libvirt will install a new interface `virbr0` that will be managed by a DNSmasq process. DNSmasq will assign IPs to the new KVM guest with DHCP. The default range is: | ||
|
||
- *192.168.122.2 to 192.168.122.254* | ||
The kvm-control's jobs will assign floating IPs to the KVM guests. These floating IPs should be able to reach the hypervisor and the gateway IPs. | ||
|
||
You can choose to assign a floating IP or a NAT IP when launching a new guest in Rundeck (i.e `Launch KVM guest`). Either way, the guest will be assigned a reserve static IP and a VNC port. | ||
### NAT IPs | ||
|
||
Deleting the KVM guest will release both the IP (floating or NAT) and the VNC port. | ||
|
||
#*chef_server-control* | ||
By default, Libvirt will configure a new interface (`virbr0`) that will be managed by a DNSmasq process. DNSmasq will assign IPs to the new KVM guest with DHCP. The default range is from **192.168.122.2** to **192.168.122.254**. | ||
|
||
This is a Docker container that come with Chef Server 11 already installed. Mission_Control will download and launch this container if you want to. It will also grab the Knife admin keys and configure the Rundeck user to be able to use Knife. | ||
### Chef-Server | ||
|
||
Also, the gem `chef-rundeck` will be installed and configure. This allows Rundeck to display Chef nodes directly in the "Nodes" panel. You can run command directly to the Chef nodes via Rundeck. | ||
You can optionally bootstrap the KVM guests to a Chef-Server at launch time. | ||
In order to use this feature, select the "Docker Chef container" option while running the `install` script. This option will appears after the installation of `kvm-control`. | ||
|
||
#*docker-control* | ||
Mission_Control will start the two following Docker instances: | ||
|
||
You can manage Docker containers and images with this project. | ||
**Chef-Server**: Comes with Chef Server 12 already installed and configured. Mission_Control will also grab the Knife admin keys and configure both your current user and the Rundeck user to be able to use the Knife command. | ||
|
||
Assumptions | ||
----------- | ||
**Chef-Rundeck**: Allows Rundeck to display the Chef client nodes directly in the "Nodes" tab. Once visible, you can run commands directly to the Chef client nodes from the Rundeck UI. | ||
|
||
###kvm-control: | ||
### Notes | ||
|
||
- VMs will reach the internet trough the hypervisor via `br0` if floating IP selected. While using NAT, `virbr0` will be used. | ||
- KVM guests will reach the internet trough the hypervisor via `br0` when the floating IPs are selected. | ||
|
||
- If a guest is launched with the NAT option, `virbr0` (192.168.122.1) will be used to route out. | ||
|
||
###chef_server-control: | ||
|
||
- The Docker Chef_Server will be accessible via HTTPS:$CHEF_PORT. | ||
- The Chef-Server container will be accessible from the hypervisor via: HTTPS://$CHEF_SERVER_CONTAINER_NAME:$CHEF_PORT. | ||
|
||
Requirements | ||
----------- | ||
|
||
###KVM | ||
### KVM Requirements | ||
|
||
The hypervisor should have `Virtual Technology` enabled. You can test this prior the installation by running: | ||
|
||
ubuntu@cbuisson:~$ egrep -c '(vmx|svm)' /proc/cpuinfo | ||
```bash | ||
cbuisson@server:~$ egrep -c '(vmx|svm)' /proc/cpuinfo | ||
#Anything but 0 is good. | ||
|
||
``` | ||
And after the installation: | ||
|
||
ubuntu@cbuisson:~$ kvm-ok | ||
```bash | ||
cbuisson@server:~$ kvm-ok | ||
INFO: /dev/kvm exists | ||
KVM acceleration can be used | ||
``` | ||
|
||
## Project: *docker-control* | ||
|
||
You can manage Docker containers and images with this project. |
Oops, something went wrong.