Skip to content
/ lokum Public

Deploy GlusterFS, Docker, Spark and JupyterHub services on bare-metal cluster.

License

Notifications You must be signed in to change notification settings

NLeSC/lokum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Badges

fair-software.nl recommendations Badge
1. Code Repository GitHub
2. License License
3. Community Registry Research Software Directory
4. Enable Citation DOI
5. Code Quality Checklist CII Best Practices

Lokum

This repository includes scripts to deploy a cluster with GlusterFS, Docker, Spark and JupyterHub services on bare-metal. Currently, it only supports Opennebula platform.

Lokum uses emma ansible playbooks to deploy services.

Technologies & Tools

Usage

1-Pull the Docker image from Docker Hub

docker pull nlesc/lokum:latest

2-Settings

2.1 VM configuration (template)

Edit config/opennebula_k8s.tpl to adjust the following VM settings:

CPU = "2.0"
VCPU = "2"
IMAGE_ID = "YOUR_IMAGE_ID"
MEMORY = "4096"
NIC = [
  NETWORK = "INTERNAL_NETWORK_NAME",
  NETWORK_UNAME = "NETWORK_USERNAME" ]

There are two SIZE variables. The first one is for the cluster itselft and the second one is for the persistent storage. The default values are about 15G and 30G.

2.2 Credentials

Edit config/variables.tf and set user credentials.

3-Deploy the cluster

docker run --rm --net=host -it \
  -v $(pwd)/config:/lokum/config \
  -v $(pwd)/deployment:/lokum/deployment \
  nlesc/lokum:latest

Confirm the planned changes by typing yes

Configuration and the ssh-keys of each deployed cluster will be stored under deployment/clusterX folder.

Connecting to the nodes

ssh to nodes

You can connect to the nodes using generated ssh keys. For example:

ssh -i ./deployment/cluster0/id_rsa_lokum_root.key root@SERVER_IP
or
ssh -i ./deployment/cluster0/id_rsa_lokum_ubuntu.key ubuntu@SERVER_IP

Starting the services manually

Run the following command in main lokum directory.

docker run --rm --net=host -it \
  -v $(pwd)/config:/lokum/config \
  -v $(pwd)/deployment:/lokum/deployment \
  nlesc/lokum:latest
DEPLOYMENT_DIR=/lokum/deployment/cluster0; ANSIBLE_HOST_KEY_CHECKING=False; export CLUSTER_NAME=lokum; cd /lokum/emma/vars; sh ./create_vars_files.sh; cd /lokum/emma; ansible-playbook -i ${DEPLOYMENT_DIR}/hosts.yaml --extra-vars 'CLUSTER_NAME=lokum' start_platform.yml --skip-tags 'jupyterhub,cassandra' --private-key=${DEPLOYMENT_DIR}/id_rsa_lokum_ubuntu.key -v

To check Apache Spark open the link below in a browser: http://NODE_1_IP:8080/