Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Latest commit

 

History

History
212 lines (149 loc) · 8.25 KB

File metadata and controls

212 lines (149 loc) · 8.25 KB

Swan Experiment Installation

This guide will walk you through installation of required binaries and services to successfully run Sensitivity Profile Experiment.

As described in Prerequisites section, we have three classes of nodes:

  • System Under Test (SUT)
  • Load Generator Agents
  • Services Node

Single node can have multiple classes, but this separation is recommended to obtain correct results from experiment.

Required Software

System Under Test Node:

SUT Node requires following application installed.

  • Experiment Binaries - Swan Experiments
  • Memcached & Best Effort Workloads - Worklods that will be tested in colocation
  • Snap - Intel Telemetry Framework
  • Hyperkube - Kubernetes in single binary
  • Docker - Container Runtime
  • Snap Plugins - Plugins for gathering telemetry & experiment results

Load Generator Agent:

  • Mutilate - Memcached Load Generator

Services Node:

  • Mutilate - Master for agent synchronisation
  • Cassandra - Database for storing experiment results
  • Hyperkube - Kubernetes Control Plane
  • Etcd - Key-Value Store for Kubernetes

The Installation details are as follow:

wget must be installed on node. Please also note that in CentOS some packages are available only in the EPEL repository thus it must be enabled by installing epel-release package:

sudo yum -y install epel-release

Docker

Please install Docker in version 17.03.

# Installs Docker from docker repository.
# https://docs.docker.com/engine/installation/linux/centos/#install-using-the-repository
sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo yum makecache fast -y
sudo yum install -y docker-ce-17.06.2.ce-1.el7.centos
sudo systemctl enable docker
sudo systemctl start docker

After installation, please pull Swan image.

sudo docker pull intelsdi/swan

Experiment Binaries

Please download Swan binaries from https://github.com/intelsdi-x/swan/releases. All snap plugins from release package must be in included in $PATH.

Memcached & Best Effort Workloads

Workloads are deployed from Swan docker image and installed in /opt/swan.

sudo yum install -y glog protobuf boost hdf5 leveldb lmdb opencv libgomp numactl-libs libevent zeromq
# Create /opt/swan/bin
sudo docker run -v /opt:/output intelsdi/swan cp -R /opt/swan /output
# Download Swan v0.15 release
wget https://github.com/intelsdi-x/swan/releases/download/v0.15/swan.tar.gz
#Extract Swan v0.15 release binaries into /opt/swan/bin 
sudo tar zxf ~/swan.tar.gz -C /opt/swan/bin

Path /opt/swan/bin must be included in $PATH.

export PATH=/opt/swan/bin:$PATH

Following workloads are installed this way:

  • Memcached 1.4.35 with thread affinity patch
  • Stress-ng - Synthethic stresser that can stress system in various selectable ways
  • Caffe - Deep Learning framework to simulate real workload

Swan also supports iBench and Stream Benchmark workloads that are not deployed by preceding script. Stress-ng supplied with Swan can stress system in similar way.

Snap

Snap installation instruction are available here.

curl -s https://packagecloud.io/install/repositories/intelsdi-x/snap/script.rpm.sh | sudo bash
sudo yum install -y snap-telemetry
sudo systemctl enable snap-telemetry.service
sudo systemctl start snap-telemetry.service

Hyperkube

Please download Hyperkube binary and put it in $PATH on SUT and Service nodes.

# Download hyperkube and sets executable bit on it.
curl -O https://storage.googleapis.com/kubernetes-release/release/v1.5.6/bin/linux/amd64/hyperkube
chmod +x hyperkube
cp hyperkube /opt/swan/bin

Snap Plugins

All plugins must be available in $PATH.

# Downloads Snap plugins and sets executable bit on them. 
sudo wget https://github.com/intelsdi-x/snap-plugin-collector-docker/releases/download/5/snap-plugin-collector-docker_linux_x86_64 -O /opt/swan/bin/snap-plugin-collector-docker
sudo wget https://github.com/intelsdi-x/snap-plugin-collector-use/releases/download/1/snap-plugin-collector-use_linux_x86_64 -O /opt/swan/bin/snap-plugin-collector-use
sudo wget https://github.com/intelsdi-x/snap-plugin-publisher-cassandra/releases/download/5/snap-plugin-publisher-cassandra_linux_x86_64 -O /opt/swan/bin/snap-plugin-publisher-cassandra
sudo wget https://github.com/intelsdi-x/snap-plugin-processor-tag/releases/download/3/snap-plugin-processor-tag_linux_x86_64 -O /opt/swan/bin/snap-plugin-processor-tag
sudo wget https://github.com/intelsdi-x/snap-plugin-publisher-file/releases/download/2/snap-plugin-publisher-file_linux_x86_64 -O /opt/swan/bin/snap-plugin-publisher-file

sudo chmod +x /opt/swan/bin/snap-plugin-collector-docker
sudo chmod +x /opt/swan/bin/snap-plugin-publisher-cassandra
sudo chmod +x /opt/swan/bin/snap-plugin-processor-tag
sudo chmod +x /opt/swan/bin/snap-plugin-publisher-file

Mutilate

Mutilate must be compiled from source on every node and mutilate binary must be available in $PATH on Services and Load Generator nodes. Please refer to Mutilate Readme for build instructions.

Full list of CentOS dependencies are below. Library cppzmq-devel is required for proper Mutilate agent synchronisation.

sudo yum install zeromq cppzmq-devel gengetopt libevent-devel scons gcc-c++
# Please clone the https://github.com/leverich/mutilate repository and build it by using `scons`.
# Make sure that cppzmq-devel is installed on all load generator hosts.
git clone https://github.com/leverich/mutilate
cd mutilate
scons
sudo cp mutilate /opt/swan/bin
cd -

Cassandra

To facilitate Cassandra setup, Swan provides simple systemd service file. It runs Cassandra docker image and provision it with keyspace and table for Snap metrics (https://github.com/intelsdi-x/snap-plugin-publisher-cassandra#plugin-database-schema).

The service file is available here.

# Downloads Cassandra service file from Swan repository, adds it to systemd and mounts persistent volume. 
wget https://raw.githubusercontent.com/intelsdi-x/swan/master/vagrant/cassandra/cassandra.service
sudo mv cassandra.service /etc/systemd/system
sudo mkdir -p /var/data/cassandra
sudo chcon -Rt svirt_sandbox_file_t /var/data/cassandra # SELinux policy
sudo systemctl enable cassandra
sudo systemctl start cassandra

For production deployments, please refer to Datastax Documentation for details.

Etcd

sudo yum install etcd

Additional Workloads (optional)

Some workloads supported by Swan are not part of default Swan image and their installation is not required for sensitivity profile generation. Workloads binaries should be included in $PATH and put inside Swan image (when run on Kubernetes).

iBench

iBench provides synthetic workloads for stressing low level hardware components.

Stream

Stream is a simple synthetic benchmark program that measures sustainable memory bandwidth (in MB/s) and the corresponding computation rate for simple vector kernels. It can be used to stress memory interconnection.

Next

Please move to Run the Experiment page.