Skip to content
Snippets Groups Projects
Commit c576e4d4 authored by Mark Goddard's avatar Mark Goddard
Browse files

Add support for Ubuntu control hosts

This enables the user to use an Ubuntu machine to manage the cloud. The
remote cloud hosts must still run CentOS.
parent 7b509044
No related branches found
No related tags found
No related merge requests found
--- ---
- include_vars: "{{ ansible_os_family }}.yml"
- name: Ensure required packages are installed - name: Ensure required packages are installed
yum: package:
name: "{{ item }}" name: "{{ item }}"
state: installed state: installed
become: True become: True
with_items: with_items: "{{ bootstrap_package_dependencies }}"
- git
- vim
- name: Check whether an SSH key exists - name: Check whether an SSH key exists
stat: stat:
......
---
# List of package dependencies to install.
bootstrap_package_dependencies:
- git
- vim
---
# List of package dependencies to install.
bootstrap_package_dependencies:
- git
- vim
--- ---
# Note: Currently we install these using Yum to the system packages rather than # Facts may not be available for the control host, so read the OS release
# manually.
- name: Check the OS release
local_action:
module: shell . /etc/os-release && echo $ID
changed_when: False
register: ip_allocation_os_release
- include_vars: "RedHat.yml"
when: ip_allocation_os_release.stdout in ['centos', 'fedora', 'rhel']
- include_vars: "Debian.yml"
when: ip_allocation_os_release.stdout in ['debian', 'ubuntu']
# Note: Currently we install these using the system package manager rather than
# pip to a virtualenv. This is because Yum is required elsewhere and cannot # pip to a virtualenv. This is because Yum is required elsewhere and cannot
# easily be installed in a virtualenv. # easily be installed in a virtualenv.
- name: Ensure package dependencies are installed - name: Ensure package dependencies are installed
local_action: local_action:
module: yum module: package
name: "{{ item }}" name: "{{ item }}"
state: installed state: installed
use: "{{ ip_allocation_package_manager }}"
become: True become: True
with_items: with_items: "{{ ip_allocation_package_dependencies }}"
- python-netaddr
- PyYAML
run_once: True run_once: True
- name: Ensure IP addresses are allocated - name: Ensure IP addresses are allocated
......
---
# Package manager to use.
ip_allocation_package_manager: apt
# List of packages to install.
ip_allocation_package_dependencies:
- python-netaddr
- python-yaml
---
# Package manager to use.
ip_allocation_package_manager: yum
# List of packages to install.
ip_allocation_packages:
- python-netaddr
- PyYAML
--- ---
- include_vars: "{{ ansible_os_family }}.yml"
- name: Ensure EPEL repo is installed - name: Ensure EPEL repo is installed
yum: yum:
name: epel-release name: epel-release
state: installed state: installed
become: True become: True
when: ansible_os_family == 'RedHat'
- name: Ensure required packages are installed - name: Ensure required packages are installed
yum: package:
name: "{{ item }}" name: "{{ item }}"
state: installed state: installed
become: True become: True
with_items: with_items: "{{ kolla_ansible_package_dependencies }}"
- gcc
- libffi-devel
- openssl-devel
- patch
- python-devel
- python-pip
- python-virtualenv
- name: Ensure source code checkout path exists - name: Ensure source code checkout path exists
file: file:
......
---
# List of packages to install.
kolla_ansible_package_dependencies:
- gcc
- libffi-dev
- libssl-dev
- patch
- python-dev
- python-pip
- python-virtualenv
---
# List of packages to install.
kolla_ansible_package_dependencies:
- gcc
- libffi-devel
- openssl-devel
- patch
- python-devel
- python-pip
- python-virtualenv
...@@ -5,26 +5,50 @@ Installation ...@@ -5,26 +5,50 @@ Installation
Prerequisites Prerequisites
============= =============
Currently Kayobe supports the following Operating Systems: Currently Kayobe supports the following Operating Systems on the control host:
- CentOS 7.3 - CentOS 7.3
- Ubuntu 16.04
To avoid conflicts with python packages installed by the system package manager To avoid conflicts with python packages installed by the system package manager
it is recommended to install Kayobe in a virtualenv. Ensure that the it is recommended to install Kayobe in a virtualenv. Ensure that the
``virtualenv`` python module is available on the control host. For example, on ``virtualenv`` python module is available on the control host.
CentOS::
$ yum install -y python-virtualenv .. code-block:: console
:caption: CentOS
$ yum install -y python-virtualenv
.. code-block:: console
:caption: Ubuntu
$ apt install -y python-virtualenv
It is necessary to install the GCC compiler chain in order to build the It is necessary to install the GCC compiler chain in order to build the
extensions of some of kayobe's python dependencies. On CentOS:: extensions of some of kayobe's python dependencies.
.. code-block:: console
:caption: CentOS
$ yum install -y gcc
$ yum install -y gcc .. code-block:: console
:caption: Ubuntu
$ apt install -y gcc
Finally, for cloning and working with the kayobe source code repository, Git is Finally, for cloning and working with the kayobe source code repository, Git is
required. On CentOS:: required.
.. code-block:: console
:caption: CentOS
$ yum install -y git
.. code-block:: console
:caption: Ubuntu
$ yum install -y git $ apt install -y git
Installation Installation
============ ============
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment