summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md19
-rw-r--r--vagrant/README.md24
-rw-r--r--vagrant/Vagrantfile38
3 files changed, 70 insertions, 11 deletions
diff --git a/README.md b/README.md
index 5988bad6787..ff67eca709b 100644
--- a/README.md
+++ b/README.md
@@ -13,22 +13,19 @@ Code licensed under the Apache 2.0 license. See [LICENSE](LICENSE) for terms.
## Get started developing
-### Set up build environment
+### Setup build environment
C++ building is supported on CentOS 7.
+We recommend using the following environment: [Create C++ dev environment on CentOS using VirtualBox and Vagrant](vagrant/README.md).
+You can also setup CentOS 7 natively and install the following build dependencies:
-#### Install required build dependencies
- sudo yum -y install epel-release centos-release-scl yum-utils
sudo yum-config-manager --add-repo https://copr.fedorainfracloud.org/coprs/g/vespa/vespa/repo/epel-7/group_vespa-vespa-epel-7.repo
- sudo yum -y --enablerepo=epel-testing install devtoolset-6-gcc-c++ devtoolset-6-libatomic-devel devtoolset-6-binutils \
- Judy-devel cmake3 ccache lz4-devel zlib-devel maven libicu-devel llvm3.9-devel \
- llvm3.9-static java-1.8.0-openjdk-devel openssl-devel rpm-build make \
- vespa-boost-devel vespa-libtorrent-devel vespa-zookeeper-c-client-devel vespa-cppunit-devel
-or use the prebuilt docker image
-
- # TODO: Add docker command
+ sudo yum -y install epel-release centos-release-scl yum-utils
+ sudo yum -y install ccache \
+ rpm-build
+ yum-builddep -y <vespa-source>/dist/vespa.spec
### Build Java modules
-Java modules can be built on any environment having Java and Maven:
+Java modules can be built on any environment having Java 8 and Maven:
sh bootstrap.sh
mvn install
diff --git a/vagrant/README.md b/vagrant/README.md
new file mode 100644
index 00000000000..4c65fe666ab
--- /dev/null
+++ b/vagrant/README.md
@@ -0,0 +1,24 @@
+
+# Create C++ dev environment on CentOS using VirtualBox and Vagrant
+
+## Prerequisites
+* [Install VirtualBox](https://www.virtualbox.org/wiki/Downloads)
+* [Install Vagrant](https://www.vagrantup.com/downloads.html)
+
+## Create dev environment
+
+### Change working directory to <vespa-source>/vagrant
+ cd <vespa-source>/vagrant
+
+### Start and provision the environment
+ vagrant up
+
+### Connect to machine via SSH
+SSH agent forwarding is enabled to ensure easy interaction with GitHub inside the machine.
+
+ vagrant ssh
+
+### Checkout vespa source inside machine
+This is needed in order to compile and run tests fast on the local file system inside the machine.
+
+ git clone git@github.com:vespa-engine/vespa.git
diff --git a/vagrant/Vagrantfile b/vagrant/Vagrantfile
new file mode 100644
index 00000000000..a4cea6aa10f
--- /dev/null
+++ b/vagrant/Vagrantfile
@@ -0,0 +1,38 @@
+# -*- mode: ruby -*-
+# vi: set ft=ruby :
+
+# For a complete reference, please see the online documentation at https://docs.vagrantup.com.
+Vagrant.configure("2") do |config|
+
+ config.vm.box = "boxcutter/centos73-desktop"
+
+ config.ssh.forward_agent = true
+
+ config.vm.synced_folder "../dist", "/vagrant/dist"
+
+ config.vm.provider "virtualbox" do |vb|
+ # Display the VirtualBox GUI when booting the machine
+ vb.gui = true
+
+ vb.memory = "8192"
+ vb.cpus = 8
+ end
+
+ # Install required and nice-to-have packages
+ config.vm.provision "shell", inline: <<-SHELL
+ yum-config-manager --add-repo https://copr.fedorainfracloud.org/coprs/g/vespa/vespa/repo/epel-7/group_vespa-vespa-epel-7.repo
+ yum -y install epel-release
+ yum -y install centos-release-scl
+ yum -y install yum-utils
+ yum -y install git \
+ ccache \
+ rpm-build \
+ valgrind \
+ sudo \
+ firefox \
+ vim
+ yum-builddep -y /vagrant/dist/vespa.spec
+ echo -e "* soft nproc 409600\n* hard nproc 409600" > /etc/security/limits.d/99-nproc.conf
+ echo -e "* soft nofile 262144\n* hard nofile 262144" > /etc/security/limits.d/99-nofile.conf
+ SHELL
+end