This repository has been archived by the owner on Oct 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2211 from mpranj/artful32
Add Vagrantfile for ubuntu artful 32-bit
- Loading branch information
Showing
8 changed files
with
146 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Trying out Elektra with Vagrant | ||
This Vagrantfile provisions a machine based on ubuntu/artful32 with all tools to build Elektra. | ||
|
||
If [Vagrant](https://www.vagrantup.com/) is installed on your machine change to the directory containing the file you are currently reading and build a box for vagrant with | ||
```sh | ||
$ vagrant up | ||
``` | ||
This will take some time. | ||
|
||
When the machine is running, access it with | ||
```sh | ||
$ vagrant ssh | ||
``` | ||
In this SSH session you can interact with the machine. | ||
|
||
By default Vagrant synchronizes the folder on the host machine containing the vagrantfile with the folder `/vagrant` in the VM. | ||
|
||
```sh | ||
# add build directory & cd to it | ||
$ mkdir /vagrant/build | ||
$ cd /vagrant/build | ||
|
||
# some exports to keep everything in the build directory | ||
$ export INSTALL_DIR="$PWD/install" | ||
$ export SYSTEM_DIR="$PWD/kdbsystem" | ||
$ export PATH=$PATH:"$PWD/bin" | ||
$ export LD_LIBRARY_PATH="$PWD/lib" | ||
$ export GTEST_ROOT="/opt/gtest" | ||
|
||
|
||
# configure | ||
$ cmake -DENABLE_COVERAGE=OFF -DENABLE_OPTIMIZATIONS=OFF -DENABLE_DEBUG=ON -DENABLE_LOGGER=ON -DBUILD_STATIC=OFF -DCMAKE_INSTALL_PREFIX="$INSTALL_DIR" -DKDB_DB_SYSTEM="$SYSTEM_DIR" -DINSTALL_SYSTEM_FILES=OFF -DPLUGINS="ALL" -DTOOLS="ALL" .. | ||
|
||
# build | ||
$ make -j4 | ||
|
||
# run Elektra's test suite | ||
$ make run_all | ||
|
||
# run the memory checks with valgrind | ||
$ make run_memcheck | ||
``` | ||
|
||
When you are done leave the VM with `CTRL-D` or `exit`. | ||
|
||
You can either shut the VM down with `vagrant halt` or delete it with `vagrant destroy`. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
# -*- mode: ruby -*- | ||
# vi: set ft=ruby : | ||
|
||
# All Vagrant configuration is done below. The "2" in Vagrant.configure | ||
# configures the configuration version (we support older styles for | ||
# backwards compatibility). Please don't change it unless you know what | ||
# you're doing. | ||
Vagrant.configure("2") do |config| | ||
# The most common configuration options are documented and commented below. | ||
# For a complete reference, please see the online documentation at | ||
# https://docs.vagrantup.com. | ||
|
||
# Every Vagrant development environment requires a box. You can search for | ||
# boxes at https://atlas.hashicorp.com/search | ||
config.vm.box = "ubuntu/artful32" | ||
|
||
# Disable automatic box update checking. If you disable this, then | ||
# boxes will only be checked for updates when the user runs | ||
# `vagrant box outdated`. This is not recommended. | ||
# config.vm.box_check_update = false | ||
|
||
# Create a forwarded port mapping which allows access to a specific port | ||
# within the machine from a port on the host machine. In the example below, | ||
# accessing "localhost:8080" will access port 80 on the guest machine. | ||
# config.vm.network "forwarded_port", guest: 80, host: 8080 | ||
|
||
# Create a private network, which allows host-only access to the machine | ||
# using a specific IP. | ||
config.vm.network "private_network", type: "dhcp", nic_type: "virtio" | ||
#config.vm.synced_folder '.', '/vagrant', nfs: true | ||
#config.vm.synced_folder ".", "/vagrant", | ||
# nfs: true, | ||
# nfs_version: 3, | ||
# nfs_udp: false | ||
# Create a public network, which generally matched to bridged network. | ||
# Bridged networks make the machine appear as another physical device on | ||
# your network. | ||
# config.vm.network "public_network" | ||
|
||
# Share an additional folder to the guest VM. The first argument is | ||
# the path on the host to the actual folder. The second argument is | ||
# the path on the guest to mount the folder. And the optional third | ||
# argument is a set of non-required options. | ||
config.vm.synced_folder "../..", "/vagrant", type: "rsync", rsync__exclude: ".git/" | ||
|
||
# Provider-specific configuration so you can fine-tune various | ||
# backing providers for Vagrant. These expose provider-specific options. | ||
# Example for VirtualBox: | ||
# | ||
config.vm.provider "virtualbox" do |vb| | ||
vb.memory = "4096" | ||
vb.cpus = "4" | ||
vb.customize ["modifyvm", :id, "--ioapic", "on"] | ||
#vb.customize [ | ||
# "storagectl", :id, | ||
# "--name", "SATA Controller", | ||
# "--hostiocache", "on" | ||
# ] | ||
# vb.customize ["modifyvm", :id, "--chipset", "ich9"] | ||
# # Display the VirtualBox GUI when booting the machine | ||
# vb.gui = true | ||
# | ||
# # Customize the amount of memory on the VM: | ||
# vb.memory = "1024" | ||
end | ||
# | ||
# View the documentation for the provider you are using for more | ||
# information on available options. | ||
|
||
# Define a Vagrant Push strategy for pushing to Atlas. Other push strategies | ||
# such as FTP and Heroku are also available. See the documentation at | ||
# https://docs.vagrantup.com/v2/push/atlas.html for more information. | ||
# config.push.define "atlas" do |push| | ||
# push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME" | ||
# end | ||
|
||
# Enable provisioning with a shell script. Additional provisioners such as | ||
# Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the | ||
# documentation for more information about their specific syntax and use. | ||
config.vm.provision "shell", inline: <<-SHELL | ||
apt-get update | ||
apt-get -y upgrade | ||
apt-get -y install curl build-essential autotools-dev automake cmake pkg-config doxygen graphviz bison ruby-dev python-dev python3-dev liblua5.2-dev tclcl-dev libaugeas-dev libyajl-dev libgit2-dev libboost-all-dev libssl-dev libcurl4-gnutls-dev libdbus-1-dev libpcre3-dev libpcre++-dev checkinstall vim valgrind clang-5.0 clang-format-5.0 htop zlib1g-dev git openjdk-8-jdk python-pip locales bison libpython3-dev liblua5.3-dev libxerces-c-dev swig | ||
pip install --upgrade cmake_format==0.4.1 pyyaml | ||
mkdir -p /opt/gtest \ | ||
&& cd /tmp \ | ||
&& curl -o gtest.tar.gz \ | ||
-L https://github.com/google/googletest/archive/4e4df226fc197c0dda6e37f5c8c3845ca1e73a49.tar.gz \ | ||
&& tar -zxvf gtest.tar.gz --strip-components=1 -C /opt/gtest \ | ||
&& rm gtest.tar.gz | ||
SHELL | ||
end | ||
|