官术网_书友最值得收藏!

Installing Ansible, playbooks, and dependencies

In order for us to successfully install OpenStack using Ansible, we need to ensure that Ansible and any expected dependencies are installed on the deployment host. The OpenStack-Ansible project provides a handy script to do this for us, which is part of the version of OpenStack-Ansible we will be deploying.

Getting ready

Ensure that you are root on the deployment host. In most cases, this is the first infrastructure controller node, infra01.

At this point, we will be checking out the version of OpenStack-Ansible from GitHub.

How to do it…

To set up Ansible and its dependencies, follow these steps:

  1. We first need to use git to check out the OpenStack-Ansible code from GitHub, so ensure that the following packages are installed (among other needed dependencies):
    apt update
    apt install git python-dev bridge-tools lsof lvm2 tcpdump build- essential ntp ntpdate python-dev libyaml-dev libpython2.7-dev libffi-dev libssl-dev python-crypto python-yaml
    
  2. We then need to grab the OpenStack-Ansible code from GitHub. At the time of writing, the Pike release branch (16.X) is described as follows, but the steps remain the same for the foreseeable future. It is recommended that you use the latest stable tag by visiting https://github.com/openstack/openstack-ansible/tags. Here we're using the latest 16 (Pike) tag denoted by 16.0.5:

    Tip

    Tip: To use a branch of the Queens release, use the following: -b 17.0.0. When the Rocky release is available, use -b 18.0.0.

    git clone -b 16.0.5 https://github.com/openstack/openstack-ansible.git /opt/openstack-ansible
    
  3. Ansible and the needed dependencies to successfully install OpenStack can be found in the /opt/openstack-ansible/scripts directory. Issue the following command to bootstrap the environment:
    cd /opt/openstack-ansible
    scripts/boot
    strap-ansible.sh
    

How it works…

The OpenStack-Ansible project provides a handy script to ensure that Ansible and the right dependencies are installed on the deployment host. This script (bootstrap-ansible.sh) lives in the scripts/ directory of the checked out OpenStack-Ansible code, so at this stage we need to grab the version we want to deploy using Git. Once we have the code, we can execute the script and wait for it to complete.

主站蜘蛛池模板: 霍山县| 卢湾区| 孝义市| 稻城县| 汤阴县| 横峰县| 北安市| 英吉沙县| 桂阳县| 策勒县| 灵台县| 斗六市| 神农架林区| 沁源县| 巩留县| 冷水江市| 思南县| 伊川县| 平潭县| 曲水县| 什邡市| 英山县| 江北区| 白玉县| 陕西省| 隆林| 大姚县| 阿拉善左旗| 外汇| 石楼县| 丽水市| 湘西| 察隅县| 苍南县| 壶关县| 汉川市| 鹤峰县| 康平县| 读书| 彝良县| 衡东县|