Mohammed Naser | 90128aa | 2024-04-29 13:21:58 -0400 | [diff] [blame] | 1 | ================== |
| 2 | Building Inventory |
| 3 | ================== |
| 4 | |
| 5 | Atmosphere relies on an Ansible inventory in order to drive the deployment of |
| 6 | all the components. |
| 7 | |
| 8 | In order to deploy Atmosphere, you will need to build a directory structure |
| 9 | that will contain all the configuration files and secrets required to deploy |
| 10 | the platform. |
| 11 | |
| 12 | The recommended layout is as follows: |
| 13 | |
| 14 | .. code-block:: text |
| 15 | |
| 16 | cloud-config |
| 17 | ├── inventory |
| 18 | │ ├── group_vars |
| 19 | │ │ ├── all |
| 20 | │ │ │ ├── ceph.yml |
| 21 | │ │ │ ├── cluster_issuer.yml |
| 22 | │ │ │ ├── endpoints.yml |
| 23 | │ │ │ ├── keepalived.yml |
| 24 | │ │ │ ├── kube-prometheus-stack.yml |
| 25 | │ │ │ ├── kubernetes.yml |
| 26 | │ │ │ ├── neutron.yml |
| 27 | │ │ │ └── secrets.sops.yml |
| 28 | │ │ ├── cephs |
| 29 | │ │ │ └── osds.yml |
| 30 | │ └── hosts.ini |
| 31 | ├── playbooks |
| 32 | │ └── site.yml |
| 33 | └── requirements.yml |
| 34 | |
Yaguang Tang | 4ac0d68 | 2025-03-07 23:33:37 +0800 | [diff] [blame] | 35 | The ``requirements.yml`` file is used to specify the atmosphere ansible collection |
| 36 | version that will be used to deploy the platform. Please refer to the `Release Notes` |
| 37 | for the version information. The file contents should look like this: |
| 38 | |
| 39 | .. code-block:: yaml |
| 40 | |
| 41 | collections: |
| 42 | - name: vexxhost.atmosphere |
| 43 | version: 4.3.1 |
| 44 | |
| 45 | To generate the inventory configuration files, you can use the ``generate_workspace`` |
| 46 | playbook to simplify the process. The following command will generate the |
| 47 | inventory in the specified directory: |
| 48 | |
| 49 | .. code-block:: bash |
| 50 | |
| 51 | ansible-playbook -e domain_name="yourdomain.com" \ |
| 52 | -e workspace_path="$(pwd)/cloud-config/inventory" \ |
| 53 | vexxhost.atmosphere.generate_workspace |
| 54 | |
| 55 | The ``cloud-config`` directory can be managed by any SCM tool of your choice, such as Git, |
| 56 | and can be used to store all the configuration files and secrets required to deploy the |
| 57 | platform. You also need to assign the domain name of your cluster to the domain_name |
| 58 | variable for production deployments. |
| 59 | |
| 60 | Refer to the other sections of the `Deployment Guide` to update the configuration files |
| 61 | according to your network and hardware specification in the inventory directory. |
| 62 | |
| 63 | The file contents should look like this: |
| 64 | |
| 65 | .. code-block:: yaml |
| 66 | |
| 67 | collections: |
| 68 | - name: vexxhost.atmosphere |
| 69 | version: 4.3.1 |
| 70 | |
| 71 | |
Mohammed Naser | 90128aa | 2024-04-29 13:21:58 -0400 | [diff] [blame] | 72 | ************* |
| 73 | ``hosts.ini`` |
| 74 | ************* |
| 75 | |
| 76 | The ``hosts.ini`` file is the Ansible inventory file that will be used to deploy |
| 77 | the platform. It is recommended to use the following layout: |
| 78 | |
| 79 | .. code-block:: ini |
| 80 | |
| 81 | [controllers] |
| 82 | ctl1.cloud.atmosphere.dev |
| 83 | ctl2.cloud.atmosphere.dev |
| 84 | ctl3.cloud.atmosphere.dev |
| 85 | |
| 86 | [computes] |
| 87 | kvm1.cloud.atmosphere.dev |
| 88 | kvm2.cloud.atmosphere.dev |
| 89 | kvm3.cloud.atmosphere.dev |
| 90 | |
| 91 | [cephs] |
| 92 | ceph1.cloud.atmosphere.dev |
| 93 | ceph2.cloud.atmosphere.dev |
| 94 | ceph3.cloud.atmosphere.dev |
| 95 | |
| 96 | .. admonition:: FQDNs are required! |
| 97 | |
| 98 | The hostnames listed in the inventory file must be a FQDN that resolves to |
| 99 | the IP address of the host. If they do not, you will have failures such |
| 100 | as agents failing to start, live migration failures and other transient |
| 101 | and hard to diagnose issues. |
Mohammed Naser | f956176 | 2024-07-05 11:25:01 -0400 | [diff] [blame] | 102 | |
| 103 | ********** |
| 104 | HTTP proxy |
| 105 | ********** |
| 106 | |
| 107 | If you nodes can only access the internet through an HTTP proxy, you will need |
| 108 | to set the following variables within your inventory which will make sure that |
| 109 | the ``containerd`` and ``dockerd`` services are able to pull images through |
| 110 | this HTTP proxy, as well as the ``download_artifact`` role which is used to |
| 111 | download artifacts for deploying the cluster. |
| 112 | |
| 113 | .. code-block:: yaml |
| 114 | |
| 115 | http_proxy: http://proxy.example.com:3128 |
| 116 | https_proxy: http://proxy.example.com:3128 |
| 117 | no_proxy: localhost,127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,169.254.0.0/16,.svc,.cluster.local |
| 118 | |
| 119 | If you have any other services that need to access the internet without going |
| 120 | through the proxy, you can add them to the ``no_proxy`` variable. |