Skip to content

Commit d497dc7

Browse files
Added documentation for MaaS Extension
1 parent f47826c commit d497dc7

File tree

8 files changed

+73
-6
lines changed

8 files changed

+73
-6
lines changed
45.5 KB
Loading
52.6 KB
Loading
55.8 KB
Loading
82.4 KB
Loading
42.2 KB
Loading
-79.6 KB
Loading

source/adminguide/extensions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ An Orchestrator extension enables CloudStack to delegate VM orchestration to an
7979
|extension.png|
8080

8181

82-
CloudStack provides in-built Orchestrator Extensions for Proxmox and Hyper-V which work with Proxmox and Hyper-V environments out of the box.
82+
CloudStack provides in-built Orchestrator Extensions for Proxmox, Hyper-V, MaaS which work with Proxmox, Hyper-V and MaaS environments out of the box.
8383

8484
.. note::
8585
- When a CloudStack host linked to an orchestrator extension is placed into Maintenance mode, all running instances on the host will be stopped.

source/adminguide/extensions/inbuilt_extensions.rst

Lines changed: 72 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
In-built Orchestrator Extensions
1717
================================
1818

19-
CloudStack provides in-built Orchestrator Extensions for Proxmox and Hyper-V. These extensions work with Proxmox and Hyper-V environments out of the box, and can also serve as reference implementations for anyone looking to develop new custom extensions.
20-
The Extension files are located at `/usr/share/cloudstack-management/extensions/Proxmox` and `/usr/share/cloudstack-management/extensions/HyperV` respectively.
21-
The Proxmox Extension is written in shell script, while the Hyper-V Extension is written in python.
22-
Both of these Extensions support some custom actions in addition to the standard VM actions like deploy, start, stop, reboot, status and delete.
19+
CloudStack provides in-built Orchestrator Extensions for Proxmox, Hyper-V and MaaS. These extensions work with Proxmox, Hyper-V and MaaS environments out of the box, and can also serve as reference implementations for anyone looking to develop new custom extensions.
20+
The Extension files are located at `/usr/share/cloudstack-management/extensions/Proxmox`, `/usr/share/cloudstack-management/extensions/HyperV` and `/usr/share/cloudstack-management/extensions/MaaS` respectively.
21+
The Proxmox Extension is written in shell script, while the Hyper-V and MaaS Extensions are written in python.
22+
All of these Extensions support some custom actions in addition to the standard VM actions like deploy, start, stop, reboot, status and delete.
2323
After installing or upgrading CloudStack, in-built Extensions will show up in the Extensions section in UI.
2424

2525
|built-in-extensions.png|
@@ -267,8 +267,70 @@ The VR responds with the correct IP address as configured in CloudStack. Once th
267267
Users can then manage the Hyper-V VM like any other CloudStack guest Instance. Users can apply Egress Policies,
268268
Firewall Rules, Port Forwarding, and other networking features seamlessly through the CloudStack UI or API.
269269

270+
MaaS
271+
^^^^^^^^
272+
273+
The MaaS CloudStack Extension is written in python script and communicates with the Canonical MaaS `https://canonical.com/maas`_ using the MaaS APIs `https://canonical.com/maas/docs/api`_.
274+
275+
Before using the MaaS Extension, ensure that the Canonical MaaS Service is configured correctly with servers added into it and accessible to CloudStack.
276+
277+
Get the API key from MaaS
278+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
279+
280+
If not already set up, create a new API Key in the MaaS UI by navigating to left column under `admin > API keys`.
281+
282+
Existing `MAAS consumer` token can used or a new API key can be generated by clicking `Generate MAAS API Key` button
283+
284+
|MaaS-add-token.png|
285+
286+
Note down the **key** value.
287+
288+
Adding MaaS to CloudStack
289+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
290+
291+
To set up the MaaS Extension, follow these steps in CloudStack:
292+
293+
#. **Use Default Extension**
294+
295+
A default MaaS Extension is already available and enabled under `Extensions` tab.
296+
297+
#. **Create Cluster**
298+
299+
Create a Cluster with Hypervisor type `External` and Extension type `MaaS`.
300+
301+
|MaaS-add-cluster.png|
302+
303+
#. **Add Host**
304+
305+
Add a Host to the newly created Cluster with the following details:
306+
307+
To access MaaS environment, the `endpoint`, `apikey` need to be set in the Host.
308+
309+
* **endpoint**: IP address of the MaaS server. The API used for operations in the script will look like `http://<endpoint>:5240/MAAS/api/2.0`.
310+
* **apikey**: API key for MaaS
311+
312+
|MaaS-add-host.png|
313+
314+
315+
#. **Create Template**
316+
317+
A Template in CloudStack can map to either a `Template` or an `ISO` in MaaS.
318+
Provide a dummy `url` and template name. Select `External` as the hypervisor and `MaaS` as the extension. Under `External Details`, specify:
270319

271-
.. _Proxmox VE API: https://pve.proxmox.com/pve-docs/api-viewer/index.html
320+
* **distro_series**: The name of the operating system series available in MaaS to install on the machine. If not specified, script defaults to `ubuntu`
321+
322+
|MaaS-add-template.png|
323+
324+
#. **Deploy Instance**
325+
326+
Deploy an Instance using the Template created above. Optionally, provide the detail `vm_name` to specify the name of the VM in MaaS.
327+
Otherwise, the CloudStack Instance's internal name is used. The Instance will be provisioned on a randomly selected MaaS machine.
328+
329+
|MaaS-deploy-instance.png|
330+
331+
#. **Lifecycle Operations**
332+
333+
Operations **Start**, **Stop**, **Reboot**, and **Delete** can be performed on the Instance from CloudStack.
272334

273335
.. Images
274336
@@ -285,3 +347,8 @@ Firewall Rules, Port Forwarding, and other networking features seamlessly throug
285347
.. |hyperv-add-host.png| image:: /_static/images/hyperv-add-host.png
286348
.. |hyperv-add-template.png| image:: /_static/images/hyperv-add-template.png
287349
.. |hyperv-add-iso.png| image:: /_static/images/hyperv-add-iso.png
350+
.. |MaaS-add-token.png| image:: /_static/images/MaaS-add-token.png
351+
.. |MaaS-add-cluster.png| image:: /_static/images/MaaS-add-cluster.png
352+
.. |MaaS-add-host.png| image:: /_static/images/MaaS-add-host.png
353+
.. |MaaS-add-template.png| image:: /_static/images/MaaS-add-template.png
354+
.. |MaaS-deploy-instance.png| image:: /_static/images/MaaS-deploy-instance.png

0 commit comments

Comments
 (0)