blob: 9479f25ba9b536d03226c1462a7e0b08cac7d2b2 [file] [log] [blame]
Mohammed Naser90128aa2024-04-29 13:21:58 -04001###########
2Quick Start
3###########
4
5There are several ways that you can quickly get started with Atmosphere to explore
6it's capabilities.
7
8**********
9Deployment
10**********
11
12This section covers all of the different ways you can deploy a quick start
13environment for Atmosphere.
14
15.. admonition:: Testing & Development Only
16 :class: info
17
18 The quick start installation is not for production use, it's perfect
19 for testing and development.
20
21All-in-one
22==========
23
24The easiest way to get started with Atmosphere is to deploy the all-in-one
25installation. This will install an entire stack of Atmosphere, with Ceph
26and all the OpenStack services inside a single machine.
27
28.. admonition:: Non-reversible Changes
29 :class: warning
30
31 The all-in-one will fully take-over the machine by making system-level
32 changes. It's recommended to run it inside a virtual machine or a
33 physical machine that can be dedicated to this purpose.
34
35In order to get started, you'll need a **Ubuntu 22.04** system with the
36following minimum system requirements:
37
38- Cores: 8 threads (or vCPUs)
39- Memory: 32GB
40
41If you're looking to run Kubernetes clusters, you'll need more memory
42for the workloads, it following minimum is recommended (but more memory
43is always better!):
44
45- Cores: 16 threads (or vCPUs)
46- Memory: 64GB
47
48.. admonition:: Nested Virtualization
49 :class: warning
50
51 If you're running this inside a virtual machine, it is **extremely**
52 important that the virtual machines supported nested virtualization,
53 otherwise the performance of the VMs will be un-usable.
54
55You'll need to start all of the necessary dependencies first:
56
57.. code-block:: bash
58
59 $ sudo apt-get update
60 $ sudo apt-get install git python3-pip
61 $ sudo pip install poetry
62
63Once done, you can clone the repository locally and switch to the
64``atmosphere`` directory:
65
66.. code-block:: bash
67
68 $ git clone https://github.com/vexxhost/atmosphere.git
69 $ cd atmosphere
70
71Once you're in the directory, you can deploy the all-in-one environment
72by running the following command:
73
74.. code-block:: bash
75
76 $ cd atmosphere
77 $ sudo poetry install --with dev
78 $ sudo poetry run molecule converge -s aio
79
80Once the deployment is done, it will have a full deployment of all services
81inside the same host, so you can use the cloud from the same machine by
82referencing the usage section.
83
84Multi-node
85==========
86
87The multi-node intends to provide the most near-production experience possible,
88as it is architected purely towards production-only environments. In order to
89get a quick production-ready experience of Atmosphere, this will deploy a full
90stack of Atmosphere, with Ceph and all the OpenStack services across multiple
91machines in a lab environment.
92
93OpenStack
94---------
95
96You can deploy Atmosphere on top of an existing OpenStack environment where many
97virtual machines will be deployed in the same way that you'd have multiple
98physical machines in a datacenter for a production environment.
99
100The quick start is powered by Molecule and it is used in continuous integration
101running against the VEXXHOST public cloud so that would be an easy target to
102use to try it out.
103
104ou will need the following quotas set up in your cloud account:
105
106* 8 instances
107* 32 cores
108* 128GB RAM
109* 360GB storage
110
111These resources will be used to create a total of 8 instances broken up as
112follows:
113
114* 3 Controller nodes
115* 3 Ceph OSD nodes
116* 2 Compute nodes
117
118First of all, you'll have to make sure you clone the repository locally to your
119system with `git` by running the following command:
120
121.. code-block:: console
122
123 $ git clone https://github.com/vexxhost/atmosphere
124
125You will need ``poetry`` installed on your operating system. You will need to make
126sure that you have the appropriate OpenStack environment variables set (such
127as ``OS_CLOUD`` or ``OS_AUTH_URL``, etc.). You can also use the following
128environment variables to tweak the behaviour of the Heat stack that is created:
129
130* ``ATMOSPHERE_STACK_NAME``: The name of the Heat stack to be created (defaults to
131 `atmosphere`).
132* ``ATMOSPHERE_PUBLIC_NETWORK``: The name of the public network to attach floating
133 IPs from (defaults to ``public``).
134* ``ATMOSPHERE_IMAGE``: The name or UUID of the image to be used for deploying the
135 instances (defaults to ``Ubuntu 20.04.3 LTS (x86_64) [2021-10-04]``).
136* ``ATMOSPHERE_INSTANCE_TYPE``(Deprecated): The instance type used to deploy all of the
137 different instances.(It doesn't have its own default value.)
138 This has been deprecated from v1.4.0. You can configure the instance type per a
139 machine role using ``ATMOSPHERE_CONTROLLER_INSTANCE_TYPE``,
140 ``ATMOSPHERE_COMPUTE_INSTANCE_TYPE``, and ``ATMOSPHERE_STORAGE_INSTANCE_TYPE``
141 variables. For backwards compatibility, if variables specific to the machine roles
142 are not set and ``ATMOSPHERE_INSTANCE_TYPE`` is set, ``ATMOSPHERE_INSTANCE_TYPE`` value
143 is used.
144* ``ATMOSPHERE_CONTROLLER_INSTANCE_TYPE``: The instance type used to deploy controller
145 instances (defaults to ``v3-standard-16``).
146* ``ATMOSPHERE_COMPUTE_INSTANCE_TYPE``: The instance type used to deploy compute
147 instances (defaults to ``v3-standard-4``).
148* ``ATMOSPHERE_STORAGE_INSTANCE_TYPE``: The instance type used to deploy storage
149 instances (defaults to ``v3-standard-4``).
150* ``ATMOSPHERE_NAMESERVERS``: A comma-separated list of nameservers to be used for
151 the instances (defaults to ``1.1.1.1``).
152* ``ATMOSPHERE_USERNAME``: The username what is used to login into the instances (
153 defaults to ``ubuntu``).
154* ``ATMOSPHERE_DNS_SUFFIX_NAME``: The DNS domainname that is used for the API and
155 Horizon. (defaults to ``nip.io``).
156* ``ATMOSPHERE_ACME_SERVER``: The ACME server, currenly this is from LetsEncrypt,
157 with StepCA from SmallStep it is possible to run a internal ACME server.
158 The CA of that ACME server should be present in the instance image.
159* ``ATMOSPHERE_ANSIBLE_VARS_PATH``: The path for ansible group_vars and host_vars.
160 This to build a multinode development cluster with own configs, that are not
161 generated by molecule. This way you can test your configs before you bring
162 them to production.
163
164Once you're ready to get started, you can run the following command to install
165poetry dependencies:
166
167.. code-block:: console
168
169 $ poetry install
170
171Then you can run the following command to build the Heat stack:
172
173.. code-block:: console
174
175 $ poetry run molecule converge
176
177This will create a Heat stack with the name `atmosphere` and start deploying
178the cloud. Once it's complete, you can login to any of the systems by using
179the `login` sub-command. For exampel, to login to the first controller node,
180you can run the following:
181
182.. code-block:: console
183
184 $ poetry run molecule login -h ctl1
185
186At this point, you can proceed to the usage section to see how to interact
187with the cloud.
188
189Once you're done with your environment and you need to tear it down, you can
190use the `destroy` sub-command:
191
192.. code-block:: console
193
194 $ poetry run molecule destroy
195
196For more information about the different commands used by Molecule, you can
197refer to the Molecule documentation.
198
199*****
200Usage
201*****
202
203Once the deployment is done, you can either use the CLI to interact with
204the OpenStack environment, or you can access the Horizon dashboard.
205
206For the CLI, you can ``source /root/openrc`` and then use the ``openstack``
207CLI. For example, if you want to list the networks, you can run the
208following command:
209
210.. code-block:: console
211
212 $ source /root/openrc
213 $ openstack network list
214
215For the Horizon dashboard, you can find the URL to access it by running
216the following command:
217
218.. code-block:: console
219
220 $ kubectl -n openstack get ingress/dashboard -ojsonpath='{.spec.rules[0].host}'
221
222You can find the credentials to login to the dashboard reading the
223`/root/openrc` file. You can use the following variables to match
224the credentials:
225
226- Username: ``OS_USERNAME``
227- Password: ``OS_PASSWORD``
228- Domain: ``OS_USER_DOMAIN_NAME``