Skip to content

Commit

Permalink
Remove baremetal deployment code
Browse files Browse the repository at this point in the history
We are not doing baremetal deployments so cleanup this code.
  • Loading branch information
farosas committed Feb 23, 2018
1 parent d6f3021 commit 6cffa8d
Show file tree
Hide file tree
Showing 19 changed files with 0 additions and 464 deletions.
82 changes: 0 additions & 82 deletions ansible/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,85 +64,3 @@ The local file is just copied to remote target.

Provide the data requested by the playbooks (e.g. Jenkins admin user name/password
and SSH keys locations) and wait for automatic setup to finish.

## Baremetal provisioning via Ansible

The `bm-deploy.yaml` playbook allows the provisioning of a POWER
(baremetal) machine using PXE. A "controller node" that can serve DHCP
to the machine being provisioned is required.

The deployment consists of two steps:

### Preparation of the controller node

This is a one time operation needed to prepare the machine that will
be used as controller for the provisioning. This machine should be in
the same network as the to-be provisioned (target) machine (this is
due to the requirement of serving DHCP to the target machine). Using a
virtual machine is OK.

The controller node is referred to in the `hosts.ini` file as
`[baremetal-ctrl]`.

Run once for each controller setup:
```
ansible-playbook -i hosts.ini --tags=setup bm-deploy.yaml
```

After that, the controller node will be capable of serving files to
the target machine.

For detailed info, see the [baremetal-ctrl](roles/baremetal-ctrl) role.

### Deployment

This step is executed each time a machine needs to be provisioned. It
uses IPMI to power the machine on/off, DHCP for setting up PXE and
HTTP for serving files. Services on the controller node are started on
demand.

Prerequisites:

- The variables file vars-baremetal.yaml should be edited with
information about the baremetal machine prior to execution of the
"deploy" tag.

- A .iso file named after the MAC address of the network interface of
the target machine (<mac_address>_deploy.iso) is expected to be at
/tmp.

```
cp <iso_file> /tmp/<ma:ca:dd:re:ss>_deploy.iso
```

Run every time a deploy is required:
```
ansible-playbook -i hosts.ini --tags=deploy bm-deploy.yaml
```

#### Deployment flow

The flow of the deploy after the user runs the playbook with the
"deploy" tag (C - controller node, B - baremetal node) is:

- C: Mount ISO file inside the HTTP server directory
- C: Using IPMI, set machine to boot via network
- C: Using IPMI, turn the baremetal machine on
- C: Serve DHCP along with PXE configuration file location


- B: Boot and download PXE configuration file from HTTP server containing kickstart location and boot params
- B: Install via kickstart
- B: Run post script that adds authorized SSH keys and starts SSH server
- C: Detect that installation has finished by SSH server presence
- C: Fetch installed filesystem UUID
- C: Copy kernel/initramfs to the controller node
- C: Reconfigure PXE to boot the new installation


- C: Using IPMI, turn the machine off
- C: Using IPMI, turn the back machine on

Deployment is finished and machine is accessible via SSH

For detailed info, see the [deploy-baremetal](roles/deploy-baremetal) role.
11 changes: 0 additions & 11 deletions ansible/bm-deploy.yaml

This file was deleted.

3 changes: 0 additions & 3 deletions ansible/hosts.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,3 @@ host-os-jenkins.example.com
[jenkins-slave]
host-os-jenkins-slave01.example.com
host-os-jenkins-slave02.example.com

[baremetal-ctrl]
host-os-jenkins-slave04.example.com
11 changes: 0 additions & 11 deletions ansible/roles/baremetal-ctrl/defaults/main.yaml

This file was deleted.

6 changes: 0 additions & 6 deletions ansible/roles/baremetal-ctrl/meta/main.yaml

This file was deleted.

26 changes: 0 additions & 26 deletions ansible/roles/baremetal-ctrl/tasks/main.yaml

This file was deleted.

12 changes: 0 additions & 12 deletions ansible/roles/baremetal-ctrl/templates/bm-deploy.conf

This file was deleted.

5 changes: 0 additions & 5 deletions ansible/roles/deploy-baremetal/defaults/main.yaml

This file was deleted.

39 changes: 0 additions & 39 deletions ansible/roles/deploy-baremetal/tasks/boot.yaml

This file was deleted.

27 changes: 0 additions & 27 deletions ansible/roles/deploy-baremetal/tasks/cleanup.yaml

This file was deleted.

34 changes: 0 additions & 34 deletions ansible/roles/deploy-baremetal/tasks/install.yaml

This file was deleted.

29 changes: 0 additions & 29 deletions ansible/roles/deploy-baremetal/tasks/main.yaml

This file was deleted.

53 changes: 0 additions & 53 deletions ansible/roles/deploy-baremetal/tasks/post_install.yaml

This file was deleted.

Loading

0 comments on commit 6cffa8d

Please sign in to comment.