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 Both of the networks need to have Internet connectivity. If only one
92 of your interfaces has Internet access, you can setup IP forwarding.
93 For an example how to accomplish that, see the script in Nokia pod 1
94 deployment (``labconfig/nokia/pod1/setup_ip_forwarding.sh``).
97 Configure JOID for your lab
98 ---------------------------
100 All configuration for the JOID deployment is specified in a ``labconfig.yaml``
101 file. Here you describe all your physical nodes, their roles in OpenStack,
102 their network interfaces, IPMI parameters etc. It's also where you configure
103 your OPNFV deployment and MAAS networks/spaces.
104 You can find example configuration files from already existing nodes in the
105 `repository <https://gerrit.opnfv.org/gerrit/gitweb?p=joid.git;a=tree;f=labconfig>`_.
107 First of all, download JOID to your Jumphost. We recommend doing this in your
112 git clone https://gerrit.opnfv.org/gerrit/p/joid.git
115 You can select the stable version of your choice by specifying the git
120 git clone -b stable/danube https://gerrit.opnfv.org/gerrit/p/joid.git
122 Create a directory in ``joid/labconfig/<company_name>/<pod_number>/`` and
123 create or copy a ``labconfig.yaml`` configuration file to that directory.
128 # All JOID actions are done from the joid/ci directory
130 mkdir -p ../labconfig/your_company/pod1
131 cp ../labconfig/nokia/pod1/labconfig.yaml ../labconfig/your_company/pod1/
133 Example ``labconfig.yaml`` configuration file:
138 location: your_company
144 roles: [network,control]
148 mac: ["12:34:56:78:9a:bc"]
151 mac: ["12:34:56:78:9a:bd"]
154 address: 192.168.10.101
159 roles: [compute,control,storage]
163 mac: ["23:45:67:89:ab:cd"]
166 mac: ["23:45:67:89:ab:ce"]
169 address: 192.168.10.102
174 roles: [compute,control,storage]
178 mac: ["34:56:78:9a:bc:de"]
181 mac: ["34:56:78:9a:bc:df"]
184 address: 192.168.10.103
189 roles: [compute,storage]
193 mac: ["45:67:89:ab:cd:ef"]
196 mac: ["45:67:89:ab:ce:f0"]
199 address: 192.168.10.104
204 roles: [compute,storage]
208 mac: ["56:78:9a:bc:de:f0"]
211 mac: ["56:78:9a:bc:df:f1"]
214 address: 192.168.10.105
217 floating-ip-range: 10.5.15.6,10.5.15.250,10.5.15.254,10.5.15.0/24
243 .. TODO: Details about the labconfig.yaml file
245 Once you have prepared the configuration file, you may begin with the automatic
251 This section will guide you through the MAAS deployment. This is the first of
252 two JOID deployment steps.
255 For all the commands in this document, please do not use a ``root`` user
256 account to run but instead use a non-root user account. We recommend using
257 the ``ubuntu`` user as described above.
259 If you have already enabled maas for your environment and installed it then
260 there is no need to enabled it again or install it. If you have patches
261 from previous MAAS install, then you can apply them here.
263 Pre-installed MAAS without using the ``03-maasdeploy.sh`` script is not
264 supported. We strongly suggest to use ``03-maasdeploy.sh`` script to deploy
265 the MAAS and JuJu environment.
267 With the ``labconfig.yaml`` configuration file ready, you can start the MAAS
268 deployment. In the joid/ci directory, run the following command:
272 # in joid/ci directory
273 ./03-maasdeploy.sh custom <absolute path of config>/labconfig.yaml
277 If you prefer, you can also host your ``labconfig.yaml`` file remotely and JOID
278 will download it from there. Just run
282 # in joid/ci directory
283 ./03-maasdeploy.sh custom http://<web_site_location>/labconfig.yaml
287 This step will take approximately 30 minutes to a couple of hours depending on
289 This script will do the following:
291 * If this is your first time running this script, it will download all the
293 * Install MAAS on the Jumphost.
294 * Configure MAAS to enlist and commission a VM for Juju bootstrap node.
295 * Configure MAAS to enlist and commission bare metal servers.
296 * Download and load Ubuntu server images to be used by MAAS.
298 Already during deployment, once MAAS is installed, configured and launched,
299 you can visit the MAAS Web UI and observe the progress of the deployment.
300 Simply open the IP of your jumphost in a web browser and navigate to the
301 ``/MAAS`` directory (e.g. ``http://10.5.1.1/MAAS`` in our example). You can
302 login with username ``ubuntu`` and password ``ubuntu``. In the *Nodes* page,
303 you can see the bootstrap node and the bare metal servers and their status.
306 If you need to re-run this step, first undo the performed actions by
314 # now you can run the ./03-maasdeploy.sh script again
322 This section will guide you through the Juju an OPNFV deployment. This is the
323 second of two JOID deployment steps.
325 JOID allows you to deploy different combinations of OpenStack and SDN solutions
326 in HA or no-HA mode. For OpenStack, it supports Newton and Ocata. For SDN, it
327 supports Open vSwitch, OpenContrail, OpenDaylight and ONOS (Open Network
328 Operating System). In addition to HA or no-HA mode, it also supports deploying
329 the latest from the development tree (tip).
331 To deploy OPNFV on the previously deployed MAAS system, use the ``deploy.sh``
336 # in joid/ci directory
337 ./deploy.sh -d xenial -m openstack -o ocata -s nosdn -f none -t noha -l custom
339 The above command starts an OPNFV deployment with Ubuntu Xenial (16.04) distro,
340 OpenStack model, Ocata version of OpenStack, Open vSwitch (and no other SDN),
341 no special features, no-HA OpenStack mode and with custom labconfig. I.e. this
342 corresponds to the ``os-nosdn-nofeature-noha`` OPNFV deployment scenario.
345 You can see the usage info of the script by running
351 Possible script arguments are as follows.
353 **Ubuntu distro to deploy**
358 - ``trusty``: Ubuntu 16.04.
359 - ``xenial``: Ubuntu 17.04.
364 [-m <openstack|kubernetes>]
366 JOID introduces two various models to deploy.
368 - ``openstack``: Openstack, which will be used for KVM/LXD
369 container-based workloads.
370 - ``kubernetes``: Kubernetes model will be used for docker-based
373 **Version of Openstack deployed**
378 - ``newton``: Newton version of OpenStack.
379 - ``ocata``: Ocata version of OpenStack.
384 [-s <nosdn|odl|opencontrail|onos>]
386 - ``nosdn``: Open vSwitch only and no other SDN.
387 - ``odl``: OpenDayLight Boron version.
388 - ``opencontrail``: OpenContrail SDN.
389 - ``onos``: ONOS framework as SDN.
391 **Feature to deploy** (comma separated list)
394 [-f <lxd|dvr|sfc|dpdk|ipv6|none>]
396 - ``none``: No special feature will be enabled.
397 - ``ipv6``: IPv6 will be enabled for tenant in OpenStack.
398 - ``lxd``: With this feature hypervisor will be LXD rather than KVM.
399 - ``dvr``: Will enable distributed virtual routing.
400 - ``dpdk``: Will enable DPDK feature.
401 - ``sfc``: Will enable sfc feature only supported with ONOS deployment.
402 - ``lb``: Load balancing in case of Kubernetes will be enabled.
404 **Mode of Openstack deployed**
409 - ``noha``: No High Availability.
410 - ``ha``: High Availability.
411 - ``tip``: The latest from the development tree.
416 [-l <custom|default|...>]
418 - ``custom``: For bare metal deployment where labconfig.yaml was provided
419 externally and not part of JOID package.
420 - ``default``: For virtual deployment where installation will be done on
421 KVM created using ``03-maasdeploy.sh``.
426 [-a <amd64|ppc64el|aarch64>]
428 - ``amd64``: Only x86 architecture will be used. Future version will
429 support arm64 as well.
431 This step may take up to a couple of hours, depending on your configuration,
432 internet connectivity etc. You can check the status of the deployment by
433 running this command in another terminal:
437 watch juju status --format tabular
441 If you need to re-run this step, first undo the performed actions by
447 # now you can run the ./deploy.sh script again
452 OPNFV Scenarios in JOID
453 -----------------------
454 Following OPNFV scenarios can be deployed using JOID. Separate yaml bundle will
455 be created to deploy the individual scenario.
457 ======================= ======= ===============================================
458 Scenario Owner Known Issues
459 ======================= ======= ===============================================
460 os-nosdn-nofeature-ha Joid
461 os-nosdn-nofeature-noha Joid
462 os-odl_l2-nofeature-ha Joid Floating ips are not working on this deployment.
463 os-nosdn-lxd-ha Joid Yardstick team is working to support.
464 os-nosdn-lxd-noha Joid Yardstick team is working to support.
465 os-onos-nofeature-ha ONOSFW
466 os-onos-sfc-ha ONOSFW
467 k8-nosdn-nofeature-noha Joid No support from Functest and Yardstick
468 k8-nosdn-lb-noha Joid No support from Functest and Yardstick
469 ======================= ======= ===============================================
476 By default debug is enabled in script and error messages will be printed on ssh
477 terminal where you are running the scripts.
479 Logs are indispensable when it comes time to troubleshoot. If you want to see
480 all the service unit deployment logs, you can run ``juju debug-log`` in another
481 terminal. The debug-log command shows the consolidated logs of all Juju agents
482 (machine and unit logs) running in the environment.
484 To view a single service unit deployment log, use ``juju ssh`` to access to the
485 deployed unit. For example to login into ``nova-compute`` unit and look for
486 ``/var/log/juju/unit-nova-compute-0.log`` for more info:
490 ubuntu@R4N4B1:~$ juju ssh nova-compute/0
491 Warning: Permanently added '172.16.50.60' (ECDSA) to the list of known hosts.
492 Warning: Permanently added '3-r4n3b1-compute.maas' (ECDSA) to the list of known hosts.
493 Welcome to Ubuntu 16.04.1 LTS (GNU/Linux 3.13.0-77-generic x86_64)
495 * Documentation: https://help.ubuntu.com/
497 Last login: Tue Feb 2 21:23:56 2016 from bootstrap.maas
498 ubuntu@3-R4N3B1-compute:~$ sudo -i
499 root@3-R4N3B1-compute:~# cd /var/log/juju/
500 root@3-R4N3B1-compute:/var/log/juju# ls
501 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
502 root@3-R4N3B1-compute:/var/log/juju#
505 By default Juju will add the Ubuntu user keys for authentication into the
506 deployed server and only ssh access will be available.
508 Once you resolve the error, go back to the jump host to rerun the charm hook
513 $ juju resolved --retry <unit>
515 If you would like to start over, run
516 ``juju destroy-environment <environment name>`` to release the resources, then
517 you can run ``deploy.sh`` again.
519 To access of any of the nodes or containers, use
523 juju ssh <service name>/<instance id>
529 juju ssh openstack-dashboard/0
530 juju ssh nova-compute/0
531 juju ssh neutron-gateway/0
533 You can see the available nodes and containers by running
539 All charm log files are available under ``/var/log/juju``.
543 If you have questions, you can join the JOID channel ``#opnfv-joid`` on
544 `Freenode <https://webchat.freenode.net/>`_.
550 The following are the common issues we have collected from the community:
552 - The right variables are not passed as part of the deployment procedure.
556 ./deploy.sh -o newton -s nosdn -t ha -l custom -f none
558 - If you have not setup MAAS with ``03-maasdeploy.sh`` then the
559 ``./clean.sh`` command could hang, the ``juju status`` command may hang
560 because the correct MAAS API keys are not mentioned in cloud listing for
563 _Solution_: Please make sure you have an MAAS cloud listed using juju
564 clouds and the correct MAAS API key has been added.
565 - Deployment times out: use the command ``juju status`` and make sure all
566 service containers receive an IP address and they are executing code.
567 Ensure there is no service in the error state.
568 - In case the cleanup process hangs,run the juju destroy-model command
571 **Direct console access** via the OpenStack GUI can be quite helpful if you
572 need to login to a VM but cannot get to it over the network.
573 It can be enabled by setting the ``console-access-protocol`` in the
574 ``nova-cloud-controller`` to ``vnc``. One option is to directly edit the
575 ``juju-deployer`` bundle and set it there prior to deploying OpenStack.
579 nova-cloud-controller:
581 console-access-protocol: vnc
583 To access the console, just click on the instance in the OpenStack GUI and
584 select the Console tab.
589 .. _`Ubuntu download`: https://www.ubuntu.com/download/server