4 Bare Metal Installation
5 =======================
6 Before proceeding, make sure that your hardware infrastructure satisfies the
7 :ref:`setup-requirements`.
12 Make sure you have at least two networks configured:
14 1. *Admin* (management) network with gateway to access the Internet (for
15 downloading installation resources).
16 2. A *public/floating* network to consume by tenants for floating IPs.
18 You may configure other networks, e.g. for data or storage, based on your
19 network options for Openstack.
22 .. _jumphost-install-os:
24 Jumphost installation and configuration
25 ---------------------------------------
27 1. Install Ubuntu 16.04 (Xenial) LTS server on Jumphost (one of the physical
31 Use ``ubuntu`` as username as password, as this matches the MAAS
32 credentials installed later.
34 During the OS installation, install the OpenSSH server package to
35 allow SSH connections to the Jumphost.
37 If the data size of the image is too big or slow (e.g. when mounted
38 through a slow virtual console), you can also use the Ubuntu mini ISO.
39 Install packages: standard system utilities, basic Ubuntu server,
40 OpenSSH server, Virtual Machine host.
42 If you have issues with blank console after booting, see
43 `this SO answer <https://askubuntu.com/a/38782>`_ and set
44 ``nomodeset``, (removing ``quiet splash`` can also be useful to see log
45 during booting) either through console in recovery mode or via SSH (if
48 2. Install git and bridge-utils packages
52 sudo apt install git bridge-utils
54 3. Configure bridges for each network to be used.
56 Example ``/etc/network/interfaces`` file:
60 source /etc/network/interfaces.d/*
62 # The loopback network interface (set by Ubuntu)
64 iface lo inet loopback
66 # Admin network interface
67 iface eth0 inet manual
69 iface brAdmin inet static
74 # Ext. network for floating IPs
75 iface eth1 inet manual
77 iface brExt inet static
85 If you choose to use the separate network for management, public, data
86 and storage, then you need to create bridge for each interface. In case
87 of VLAN tags, use the appropriate network on Jumphost depending on the
88 VLAN ID on the interface.
91 Configure JOID for your lab
92 ---------------------------
94 All configuration for the JOID deployment is specified in a ``labconfig.yaml``
95 file. Here you describe all your physical nodes, their roles in OpenStack,
96 their network interfaces, IPMI parameters etc. It's also where you configure
97 your OPNFV deployment and MAAS networks/spaces.
98 You can find example configuration files from already existing nodes in the
99 `repository <https://gerrit.opnfv.org/gerrit/gitweb?p=joid.git;a=tree;f=labconfig>`_.
101 First of all, download JOID to your Jumphost. We recommend doing this in your
106 git clone https://gerrit.opnfv.org/gerrit/p/joid.git
109 You can select the stable version of your choice by specifying the git
114 git clone -b stable/danube https://gerrit.opnfv.org/gerrit/p/joid.git
116 Create a directory in ``joid/labconfig/<company_name>/<pod_number>/`` and
117 create or copy a ``labconfig.yaml`` configuration file to that directory.
122 # All JOID actions are done from the joid/ci directory
124 mkdir -p ../labconfig/your_company/pod1
125 cp ../labconfig/nokia/pod1/labconfig.yaml ../labconfig/your_company/pod1/
127 Example ``labconfig.yaml`` configuration file:
132 location: your_company
138 roles: [network,control]
142 mac: ["12:34:56:78:9a:bc"]
145 mac: ["12:34:56:78:9a:bd"]
148 address: 192.168.10.101
153 roles: [compute,control,storage]
157 mac: ["23:45:67:89:ab:cd"]
160 mac: ["23:45:67:89:ab:ce"]
163 address: 192.168.10.102
168 roles: [compute,control,storage]
172 mac: ["34:56:78:9a:bc:de"]
175 mac: ["34:56:78:9a:bc:df"]
178 address: 192.168.10.103
183 roles: [compute,storage]
187 mac: ["45:67:89:ab:cd:ef"]
190 mac: ["45:67:89:ab:ce:f0"]
193 address: 192.168.10.104
198 roles: [compute,storage]
202 mac: ["56:78:9a:bc:de:f0"]
205 mac: ["56:78:9a:bc:df:f1"]
208 address: 192.168.10.105
211 floating-ip-range: 10.5.15.6,10.5.15.250,10.5.15.254,10.5.15.0/24
237 .. TODO: Details about the labconfig.yaml file
239 Once you have prepared the configuration file, you may begin with the automatic
245 This section will guide you through the MAAS deployment. This is the first of
246 two JOID deployment steps.
249 For all the commands in this document, please do not use a ``root`` user
250 account to run but instead use a non-root user account. We recommend using
251 the ``ubuntu`` user as described above.
253 If you have already enabled maas for your environment and installed it then
254 there is no need to enabled it again or install it. If you have patches
255 from previous MAAS install, then you can apply them here.
257 Pre-installed MAAS without using the ``03-maasdeploy.sh`` script is not
258 supported. We strongly suggest to use ``03-maasdeploy.sh`` script to deploy
259 the MAAS and JuJu environment.
261 With the ``labconfig.yaml`` configuration file ready, you can start the MAAS
262 deployment. In the joid/ci directory, run the following command:
266 # in joid/ci directory
267 ./03-maasdeploy.sh custom <absolute path of config>/labconfig.yaml
271 If you prefer, you can also host your ``labconfig.yaml`` file remotely and JOID
272 will download it from there. Just run
276 # in joid/ci directory
277 ./03-maasdeploy.sh custom http://<web_site_location>/labconfig.yaml
281 This step will take approximately 30 minutes to a couple of hours depending on
283 This script will do the following:
285 * If this is your first time running this script, it will download all the
287 * Install MAAS on the Jumphost.
288 * Configure MAAS to enlist and commission a VM for Juju bootstrap node.
289 * Configure MAAS to enlist and commission bare metal servers.
290 * Download and load Ubuntu server images to be used by MAAS.
292 Already during deployment, once MAAS is installed, configured and launched,
293 you can visit the MAAS Web UI and observe the progress of the deployment.
294 Simply open the IP of your jumphost in a web browser and navigate to the
295 ``/MAAS`` directory (e.g. ``http://10.5.1.1/MAAS`` in our example). You can
296 login with username ``ubuntu`` and password ``ubuntu``. In the *Nodes* page,
297 you can see the bootstrap node and the bare metal servers and their status.
300 If you need to re-run this step, first undo the performed actions by
308 # now you can run the ./03-maasdeploy.sh script again
316 This section will guide you through the Juju an OPNFV deployment. This is the
317 second of two JOID deployment steps.
319 JOID allows you to deploy different combinations of OpenStack and SDN solutions
320 in HA or no-HA mode. For OpenStack, it supports Newton and Ocata. For SDN, it
321 supports Open vSwitch, OpenContrail, OpenDaylight and ONOS (Open Network
322 Operating System). In addition to HA or no-HA mode, it also supports deploying
323 the latest from the development tree (tip).
325 To deploy OPNFV on the previously deployed MAAS system, use the ``deploy.sh``
330 # in joid/ci directory
331 ./deploy.sh -d xenial -m openstack -o ocata -s nosdn -f none -t noha -l custom
333 The above command starts an OPNFV deployment with Ubuntu Xenial (16.04) distro,
334 OpenStack model, Ocata version of OpenStack, Open vSwitch (and no other SDN),
335 no special features, no-HA OpenStack mode and with custom labconfig. I.e. this
336 corresponds to the ``os-nosdn-nofeature-noha`` OPNFV deployment scenario.
339 You can see the usage info of the script by running
345 Possible script arguments are as follows.
347 **Ubuntu distro to deploy**
352 - ``trusty``: Ubuntu 16.04.
353 - ``xenial``: Ubuntu 17.04.
358 [-m <openstack|kubernetes>]
360 JOID introduces two various models to deploy.
362 - ``openstack``: Openstack, which will be used for KVM/LXD
363 container-based workloads.
364 - ``kubernetes``: Kubernetes model will be used for docker-based
367 **Version of Openstack deployed**
372 - ``newton``: Newton version of OpenStack.
373 - ``ocata``: Ocata version of OpenStack.
378 [-s <nosdn|odl|opencontrail|onos>]
380 - ``nosdn``: Open vSwitch only and no other SDN.
381 - ``odl``: OpenDayLight Boron version.
382 - ``opencontrail``: OpenContrail SDN.
383 - ``onos``: ONOS framework as SDN.
385 **Feature to deploy** (comma separated list)
388 [-f <lxd|dvr|sfc|dpdk|ipv6|none>]
390 - ``none``: No special feature will be enabled.
391 - ``ipv6``: IPv6 will be enabled for tenant in OpenStack.
392 - ``lxd``: With this feature hypervisor will be LXD rather than KVM.
393 - ``dvr``: Will enable distributed virtual routing.
394 - ``dpdk``: Will enable DPDK feature.
395 - ``sfc``: Will enable sfc feature only supported with ONOS deployment.
396 - ``lb``: Load balancing in case of Kubernetes will be enabled.
398 **Mode of Openstack deployed**
403 - ``noha``: No High Availability.
404 - ``ha``: High Availability.
405 - ``tip``: The latest from the development tree.
410 [-l <custom|default|...>]
412 - ``custom``: For bare metal deployment where labconfig.yaml was provided
413 externally and not part of JOID package.
414 - ``default``: For virtual deployment where installation will be done on
415 KVM created using ``03-maasdeploy.sh``.
420 [-a <amd64|ppc64el|aarch64>]
422 - ``amd64``: Only x86 architecture will be used. Future version will
423 support arm64 as well.
425 This step may take up to a couple of hours, depending on your configuration,
426 internet connectivity etc. You can check the status of the deployment by
427 running this command in another terminal:
431 watch juju status --format tabular
435 If you need to re-run this step, first undo the performed actions by
441 # now you can run the ./deploy.sh script again
446 OPNFV Scenarios in JOID
447 -----------------------
448 Following OPNFV scenarios can be deployed using JOID. Separate yaml bundle will
449 be created to deploy the individual scenario.
451 ======================= ======= ===============================================
452 Scenario Owner Known Issues
453 ======================= ======= ===============================================
454 os-nosdn-nofeature-ha Joid
455 os-nosdn-nofeature-noha Joid
456 os-odl_l2-nofeature-ha Joid Floating ips are not working on this deployment.
457 os-nosdn-lxd-ha Joid Yardstick team is working to support.
458 os-nosdn-lxd-noha Joid Yardstick team is working to support.
459 os-onos-nofeature-ha ONOSFW
460 os-onos-sfc-ha ONOSFW
461 k8-nosdn-nofeature-noha Joid No support from Functest and Yardstick
462 k8-nosdn-lb-noha Joid No support from Functest and Yardstick
463 ======================= ======= ===============================================
470 By default debug is enabled in script and error messages will be printed on ssh
471 terminal where you are running the scripts.
473 Logs are indispensable when it comes time to troubleshoot. If you want to see
474 all the service unit deployment logs, you can run ``juju debug-log`` in another
475 terminal. The debug-log command shows the consolidated logs of all Juju agents
476 (machine and unit logs) running in the environment.
478 To view a single service unit deployment log, use ``juju ssh`` to access to the
479 deployed unit. For example to login into ``nova-compute`` unit and look for
480 ``/var/log/juju/unit-nova-compute-0.log`` for more info:
484 ubuntu@R4N4B1:~$ juju ssh nova-compute/0
485 Warning: Permanently added '172.16.50.60' (ECDSA) to the list of known hosts.
486 Warning: Permanently added '3-r4n3b1-compute.maas' (ECDSA) to the list of known hosts.
487 Welcome to Ubuntu 16.04.1 LTS (GNU/Linux 3.13.0-77-generic x86_64)
489 * Documentation: https://help.ubuntu.com/
491 Last login: Tue Feb 2 21:23:56 2016 from bootstrap.maas
492 ubuntu@3-R4N3B1-compute:~$ sudo -i
493 root@3-R4N3B1-compute:~# cd /var/log/juju/
494 root@3-R4N3B1-compute:/var/log/juju# ls
495 machine-2.log unit-ceilometer-agent-0.log unit-ceph-osd-0.log unit-neutron-contrail-0.log unit-nodes-compute-0.log unit-nova-compute-0.log unit-ntp-0.log
496 root@3-R4N3B1-compute:/var/log/juju#
499 By default Juju will add the Ubuntu user keys for authentication into the
500 deployed server and only ssh access will be available.
502 Once you resolve the error, go back to the jump host to rerun the charm hook
507 $ juju resolved --retry <unit>
509 If you would like to start over, run
510 ``juju destroy-environment <environment name>`` to release the resources, then
511 you can run ``deploy.sh`` again.
513 To access of any of the nodes or containers, use
517 juju ssh <service name>/<instance id>
523 juju ssh openstack-dashboard/0
524 juju ssh nova-compute/0
525 juju ssh neutron-gateway/0
527 You can see the available nodes and containers by running
533 All charm log files are available under ``/var/log/juju``.
537 If you have questions, you can join the JOID channel ``#opnfv-joid`` on
538 `Freenode <https://webchat.freenode.net/>`_.
544 The following are the common issues we have collected from the community:
546 - The right variables are not passed as part of the deployment procedure.
550 ./deploy.sh -o newton -s nosdn -t ha -l custom -f none
552 - If you have not setup MAAS with ``03-maasdeploy.sh`` then the
553 ``./clean.sh`` command could hang, the ``juju status`` command may hang
554 because the correct MAAS API keys are not mentioned in cloud listing for
557 _Solution_: Please make sure you have an MAAS cloud listed using juju
558 clouds and the correct MAAS API key has been added.
559 - Deployment times out: use the command ``juju status`` and make sure all
560 service containers receive an IP address and they are executing code.
561 Ensure there is no service in the error state.
562 - In case the cleanup process hangs,run the juju destroy-model command
565 **Direct console access** via the OpenStack GUI can be quite helpful if you
566 need to login to a VM but cannot get to it over the network.
567 It can be enabled by setting the ``console-access-protocol`` in the
568 ``nova-cloud-controller`` to ``vnc``. One option is to directly edit the
569 ``juju-deployer`` bundle and set it there prior to deploying OpenStack.
573 nova-cloud-controller:
575 console-access-protocol: vnc
577 To access the console, just click on the instance in the OpenStack GUI and
578 select the Console tab.
583 .. _`Ubuntu download`: https://www.ubuntu.com/download/server