RiftWare installation (release 0): Difference between revisions

From OSM Public Wiki
Jump to: navigation, search
No edit summary
 
(43 intermediate revisions by 5 users not shown)
Line 1: Line 1:
There are two ways to set up a build environment suitable for building RIFT.ware. You can extract the code from the ETSI repo, run the mkvmimg script in the scripts/vm_image directory with the -m build option or you can download it from open.riftio.com Download under Binary Resources, save the Fedora based build VM (rift-build-latest) to your system.
__TOC__


building your own build VM image on any recent fedora system
=VM creation=
  # git clone https://osm.etsi.org/gerrit/osm/riftware.git rift
* Requirements:
  # cd rift
** 1 vCPU (16 recommended)
  # ./rift-shell
** 8 GB RAM (32 GB recommended)
  # .scripts/vm_image/mkvmimage -c -m build -e 8
** 40 GB disk storage available on the hypervisor to hold the disk image
Note that the same procedure can produce a smaller image that only has the components needed to run RIFT.ware Launchpad
** 1 network interface to the OSM network
  # .scripts/vm_image/mkvmimage -c -m ui
*Base image: Fedora 20 (fc20)


or you can download the images from https://open.riftio.com/download/
= Build and Installation procedure for R0 =


Launch the build VM, and log in with username/password root/toor or use Horizon to install your own ssh keys
== Step 1 -- build or download a build VM ==
 
There are two ways to set up a build environment suitable for building RIFT.ware.
 
=== OPTION 1 - Download a pre built image ===
Download the images from http://repo.riftio.com/releases/open.riftio.com/4.2.0/rift-build-latest.qcow2. Also download the ssh key from http://repo.riftio.com/releases/open.riftio.com/4.2.0/id_grunt
 
Launch the build VM, Please allocate at least the following resources to the VM:
* 1 vCPU (16 recommended)
* 8 GB RAM (32 GB recommended)
* 40 GB disk storage available on the hypervisor to hold the disk image
 
Log in as root using the ssh key downloaded above, e.g <pre>ssh -l root -i id_grunt 1.2.3.4</pre> or use Horizon to install your own ssh keys.
 
=== OPTION 2 - build a VM from the inside ===
 
This is the recommended base image: http://repo.riftio.com/releases/4.0/vm_images/Fedora-x86_64-20-20131211.1-sda.qcow2
 
Resize the disk to 40 GB and set the root password
qemu-img create -f qcow2 -o preallocation=metadata rift.qcow2 40G'''
virt-resize --expand /dev/sda1 Fedora-x86_64-20-20131211.1-sda.qcow2 rift.qcow2
virt-sysprep --root-password password:xxxx  -a rift.qcow2
 
Create an instance:
* allocate 4 vCPUs and 32 GB RAM if you can
* minimum is 1 vCPU and 8 GB RAM
 
Once done, from inside the new VM, follow these instructions ([[RiftWare Build VM Script]]) to install all required packages, including a new kernel. Be sure to reboot the VM after building to load the new kernel.
 
== Step 2 -- build RIFT.ware ==


Download the RIFT.ware source code from ETSI
Download the RIFT.ware source code from ETSI
Line 18: Line 47:
  # git clone https://osm.etsi.org/gerrit/osm/riftware.git rift
  # git clone https://osm.etsi.org/gerrit/osm/riftware.git rift
  # cd rift
  # cd rift
# git checkout tags/v0.0 -b v0.0
# git pull origin master
# ./rift-shell
# make rw.ext


Download confd-basic-6.0.linux.x86_64.zip from Cisco DevNet Downloads and extract the file to a location on your system.
Build. Depending on the amount of memory allocated to the VM, you can adjust the -j setting. With 8 GB RAM, use -j1. With 32 GB RAM, you can use -j8 and the build will be much faster.
 
The zip archive contains several files, but you need only the following two:
 
* confd-basic-6.0.linux.x86_64.installer.bin
* confd-basic-6.0.libconfd.tar.gz
Move or copy the extracted confd files to the following directories on the VM. Type y (yes) if you are prompted to overwrite existing files.
 
# mv confd-basic-6.0.linux.x86_64.installer.bin modules/ext/mgmt/confd_basic
# mv confd-basic-6.0.libconfd.tar.gz modules/ext/mgmt/libconfd/libconfd-basic-6.0
 
Note: In RIFT.ware 4.1.1, if the operator tries to use the Logs feature, LogAnalyzer is unable to access /var/log/rift/rift.log because permissions on /var/log/rift are set to 600. To resolve permissions issues, run: chmod 755 /var/log/rift


Load rift shell and build
# make -j1  rw


# ./rift-shell
=Running=
# rwmake CONFD=BASIC


Start the RIFT.ware Launchpad service
Start the RIFT.ware Launchpad service
# make rw.start_lp


Logs are in /var/log/rift/ and /var/log/launchpad_console.log


Change to the /home/rift directory:
You can attach to the session by running
  # cd /home/rift
  # screen -R
Create the riftware-launchpad services directory:


# mkdir -p .install/var/rift/services/riftware-launchpad/
FYI...the keystroke sequence to exit screen is control-a control-d
Copy the Launchpad helper scripts:


# cp -p scripts/packaging/services/riftware-launchpad/rwlp-start.sh .install/var/rift/services/riftware-launchpad
You can stop launchpad using:
  # cp -p scripts/packaging/services/riftware-launchpad/rwlp-stop.sh .install/var/rift/services/riftware-launchpad
  # systemctl stop rwlp
# cp -p scripts/packaging/services/riftware-launchpad/rwlp.screenrc .install/var/rift/services/riftware-launchpad
Copy the rwlp.service to systemd location:


# install -p -D -m 644 scripts/packaging/services/riftware-launchpad/rwlp.service /usr/lib/systemd/system/rwlp.service
You can connect to the service via a web browser (Google Chrome version 50 or later is recommended). Open a browser and connect to https://1.2.3.4:8000 , replacing 1.2.3.4 with the IP address of your VM. Note that it uses https, not http. <br/>
Reload systemd to process the new service:
We recommend using Google Chrome when connecting to an SSL enabled Launchpad. <br/>
If you are using Firefox and plan to use the self-signed certificate provided in the installation, please follow instructions at http://open.riftio.com/webdocs/RIFTware-4.2/Authoring/User/AvoidingSelfSignedCertificateWarning.htm?Highlight=certificate#Using2 <br/>
Alternatively, you can run Launchpad with SSL disabled as per http://open.riftio.com/webdocs/RIFTware-4.2/Authoring/User/RunLpSSLDisabled.htm


# systemctl daemon-reload
Start the RIFT.ware Launchpad service:


# service rwlp start
{{Feedback}}

Latest revision as of 14:50, 20 July 2016

VM creation

  • Requirements:
    • 1 vCPU (16 recommended)
    • 8 GB RAM (32 GB recommended)
    • 40 GB disk storage available on the hypervisor to hold the disk image
    • 1 network interface to the OSM network
  • Base image: Fedora 20 (fc20)

Build and Installation procedure for R0

Step 1 -- build or download a build VM

There are two ways to set up a build environment suitable for building RIFT.ware.

OPTION 1 - Download a pre built image

Download the images from http://repo.riftio.com/releases/open.riftio.com/4.2.0/rift-build-latest.qcow2. Also download the ssh key from http://repo.riftio.com/releases/open.riftio.com/4.2.0/id_grunt

Launch the build VM, Please allocate at least the following resources to the VM:

  • 1 vCPU (16 recommended)
  • 8 GB RAM (32 GB recommended)
  • 40 GB disk storage available on the hypervisor to hold the disk image

Log in as root using the ssh key downloaded above, e.g

ssh -l root -i id_grunt 1.2.3.4

or use Horizon to install your own ssh keys.

OPTION 2 - build a VM from the inside

This is the recommended base image: http://repo.riftio.com/releases/4.0/vm_images/Fedora-x86_64-20-20131211.1-sda.qcow2

Resize the disk to 40 GB and set the root password

qemu-img create -f qcow2 -o preallocation=metadata rift.qcow2 40G
virt-resize --expand /dev/sda1 Fedora-x86_64-20-20131211.1-sda.qcow2 rift.qcow2
virt-sysprep --root-password password:xxxx  -a rift.qcow2

Create an instance:

  • allocate 4 vCPUs and 32 GB RAM if you can
  • minimum is 1 vCPU and 8 GB RAM

Once done, from inside the new VM, follow these instructions (RiftWare Build VM Script) to install all required packages, including a new kernel. Be sure to reboot the VM after building to load the new kernel.

Step 2 -- build RIFT.ware

Download the RIFT.ware source code from ETSI

# rm -rf /home/rift 
# cd /home
# git clone https://osm.etsi.org/gerrit/osm/riftware.git rift
# cd rift
# git checkout tags/v0.0 -b v0.0
# git pull origin master
# ./rift-shell
# make rw.ext

Build. Depending on the amount of memory allocated to the VM, you can adjust the -j setting. With 8 GB RAM, use -j1. With 32 GB RAM, you can use -j8 and the build will be much faster.

# make -j1  rw

Running

Start the RIFT.ware Launchpad service

# make rw.start_lp

Logs are in /var/log/rift/ and /var/log/launchpad_console.log

You can attach to the session by running

# screen -R

FYI...the keystroke sequence to exit screen is control-a control-d

You can stop launchpad using:

# systemctl stop rwlp

You can connect to the service via a web browser (Google Chrome version 50 or later is recommended). Open a browser and connect to https://1.2.3.4:8000 , replacing 1.2.3.4 with the IP address of your VM. Note that it uses https, not http.
We recommend using Google Chrome when connecting to an SSL enabled Launchpad.
If you are using Firefox and plan to use the self-signed certificate provided in the installation, please follow instructions at http://open.riftio.com/webdocs/RIFTware-4.2/Authoring/User/AvoidingSelfSignedCertificateWarning.htm?Highlight=certificate#Using2
Alternatively, you can run Launchpad with SSL disabled as per http://open.riftio.com/webdocs/RIFTware-4.2/Authoring/User/RunLpSSLDisabled.htm


Your feedback is most welcome!
You can send us your comments and questions to OSM_TECH@list.etsi.org
Or join the OpenSourceMANO Slack Workplace
See hereafter some best practices to report issues on OSM