Another new project – Walmarts OneOps – Day 2

DNF should have a few more waring messages

Playing with OneOps. Installing the vagrant setup.

It needs VirtualBox.
VirtualBox needs kernel-devel.

dnf install kernel-devel
No problems.

But VirtualBox still failed to install the kernel driver.

The problem was…
since I installed the system there had been a kernel update in the repositories, the kernel-devel installed files for a version of the kernel that the system was not actually running, it was running on an older kernel.

dnf update
shutdown -r now

Then “/usr/lib/virtualbox/vboxdrv.sh setup” compiled the kernel module OK.

It would have been nice if DNF had installed the kernel source files for the current kernel, or warn it was installing kernel source for a version of the kernel that was not installed. It probably needs a dependency on the kernel.

Anyway, Day 2 and the current issues are…

Issue One, the OneOps doc is missing a vital parameter, following it gives the error below (see the update at the end of the post for the missing parameter)… oh, and you must be the root user to run this “vagrant up” command which I have an issue with.

[root@localhost ~]# cd ~oneops/setup/vagrant
[root@localhost vagrant]# vagrant up
Bringing machine 'default' up with 'libvirt' provider...
==> default: Box 'bento/centos-6.7' could not be found. Attempting to find and install...
    default: Box Provider: libvirt
    default: Box Version: >= 0
==> default: Loading metadata for box 'bento/centos-6.7'
    default: URL: https://atlas.hashicorp.com/bento/centos-6.7
The box you're attempting to add doesn't support the provider
you requested. Please find an alternate box or use an alternate
provider. Double-check your requested provider to verify you didn't
simply misspell it.

If you're adding a box from HashiCorp's Atlas, make sure the box is
released.

Name: bento/centos-6.7
Address: https://atlas.hashicorp.com/bento/centos-6.7
Requested provider: [:libvirt]
[root@localhost vagrant]# 

Issue Two, the doco states that if it did start up OneOps will be running on http://localhost:3000, so even though making progress there is still the minor (ok major) issue that all the interfaces are bound to localhost which being a “server” has no X-gui to run a web browser.

So, to progress I have to not only find all the config files using localhost but find the config files selecting the “box”, browsing the”box” weblinks from another machine there is a bento/fedora-22 that mght work. This may be explained in the documentation, but as noted in the prior post as the documentation is also only served to localhost I am trying to navigate it with a text browser (lynx) which makes finding things difficult.

Steps to get to the current point since the Day 1 post

This is the final working steps to get to this point, using DNF to download where possible instead of blindly following the OneOps doc which takes you to vendor sites to download RPMs which wil not install without manually installing lots of dependancies, that are better hanndled automatically via DNF if possible.

su - root

dnf install vagrant

cat < < EOF > /etc/tum.repos.d/virtualbox
[virtualbox]
name=Fedora $releasever - $basearch - VirtualBox
baseurl=http://download.virtualbox.org/virtualbox/rpm/fedora/$releasever/$basearch
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://www.virtualbox.org/download/oracle_vbox.asc
EOF

dnf update                  # DO THIS to avoid conflicts with kernel-devel
dnf install kernel-devel    # needed for virtualbox
dnf install libvirt vagrant-libvirt  # used as a required driver for vagrant
shutdown -r now
dnf install VirtualBox-5.0
vi /etc/group
   Add the oneops user to the vcboxusers group that was created

su - oneops
git clone https://github.com/oneops/setup
exit     # (back to the root user)
cd ~oneops/setup/vagrant
vagrant up

The Day 3 post will probably not be until the weekend.
Other minor projects I need to tidy up will keep me busy until then.

Update 2016/03/08

Ok, the error from the “vagrant up” command was that there was no image for libvirt… that woukld be why OneOps install instructions wanted VirtualBox installed. The command to use that should have been in the OneOps documentation for using the vagrant setup is “vagrant up –provider virtualbox“.

That gets past the no libvirt image error and we move on to the next error as below.

root@localhost vagrant]# vagrant up --provider virtualbox
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'bento/centos-6.7' could not be found. Attempting to find and install...
    default: Box Provider: virtualbox
    default: Box Version: >= 0
==> default: Loading metadata for box 'bento/centos-6.7'
    default: URL: https://atlas.hashicorp.com/bento/centos-6.7
==> default: Adding box 'bento/centos-6.7' (v2.2.5) for provider: virtualbox
    default: Downloading: https://vagrantcloud.com/bento/boxes/centos-6.7/versions/2.2.5/providers/virtualbox.box
==> default: Successfully added box 'bento/centos-6.7' (v2.2.5) for 'virtualbox'!
==> default: Importing base box 'bento/centos-6.7'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'bento/centos-6.7' is up to date...
==> default: Setting the name of the VM: oneops
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 3001 (guest) => 3003 (host) (adapter 1)
    default: 3000 (guest) => 9090 (host) (adapter 1)
    default: 8161 (guest) => 8166 (host) (adapter 1)
    default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["startvm", "45781759-297d-482c-9f70-9acbe0815c45", "--type", "headless"]

Stderr: VBoxManage: error: VT-x is not available (VERR_VMX_NO_VMX)
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component ConsoleWrap, interface IConsole
[root@localhost vagrant]# 

This is unfortunately probably because I am doing all this testing in a VM instead of on physical hardware.

So I am not sure if I want to take this any further at this time. The main reason for that is having ruby/rubygems installed on a system always causes problems with OS upgrades.
I do not really have the time to do a disk image backup, play with this, and do a disk image restore when finished playing… as this is my main ‘play/test’ system and it already has another four VMs running for three other projects that I have more need of, that I do not want interrupted.

So my curiosity about OneOps is now on hold until I have a window I can use a week to play and restore back to.

About mark

At work, been working on Tandems for around 30yrs (programming + sysadmin), plus AIX and Solaris sysadmin also thrown in during the last 20yrs; also about 5yrs on MVS (mainly operations and automation but also smp/e work). At home I have been using linux for decades. Programming background is commercially in TAL/COBOL/SCOBOL/C(Tandem); 370 assembler(MVS); C, perl and shell scripting in *nix; and Microsoft Macro Assembler(windows).
This entry was posted in Unix. Bookmark the permalink.