** THIS IS A WORK IN PROGRESS. PLEASE DO NOT USE THIS, AND INSTEAD REFER TO DAVID PESCE'S ORIGINAL REP **
gmram
This is straight fork of David Pesce's development environment for LL. I have forked it so I can experiment. If you need to install LL on CentOS (I've done it on a DO droplet), please please refer to https://github.com/davidpesce/learninglocker-v1-dev-env for the instructions.
I've detailed out how to install Ansible & Vagrant on a DO droplet, assuming you are the root user. If you aren't, please append
sudo
to each command
The main intent of this repository is for developers of LearningLocker (v1) to rapidly create a local instance of LearningLocker.
This project contains Vagrant and Ansible scripts to provision CentOS 7.3 machines with LearningLocker.
This LearningLocker installation will depend on Apache2 and MongoDB.
- Download and install Vagrant: https://www.vagrantup.com/downloads.html https://linuxconfig.org/vagrant-installation-on-centos-linux-system
As of March 2017, this corresponds to:
wget -q https://releases.hashicorp.com/vagrant/1.9.3/vagrant_1.9.3_x86_64.rpm yum localinstall vagrant_1.9.3_x86_64.rpm
Now, install dkms & then virtualbox as a provider for Vagrant: (https://jonathansblog.co.uk/installing-vagrant-on-centos-7)
yum install dkms
cd /etc/yum.repos.d wget http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo
run system update
yum update
yum provides virtualbox
Copy the filename in the last entry and use it to install virtualbox. In my case (March 2017), this was:
yum install VirtualBox-5.1-5.1.18_114002_el7-1.x86_64
- Install Ansible: http://docs.ansible.com/ansible/intro_installation.html
- If on Mac with Homebrew installed: http://brewformulas.org/Ansible
(https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-ansible-on-centos-7)
To do this, first install red hat EPEL using the following command:
yum install epel-release
Now, update your system using
yum update
Now, install Ansible using
yum install ansible
yum install httpd
https://docs.mongodb.com/v3.0/tutorial/install-mongodb-on-red-hat/
nano /etc/yum.repos.d/mongodb-org-3.0.repo
Paste the following in the file:
[mongodb-org-3.0] name=MongoDB Repository baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.0/x86_64/ gpgcheck=0 enabled=1
Now install Mongodb
yum install -y mongodb-org
systemctl enable httpd.service
to start apache everytime the server restarts
sudo service mongod start
to start mongodb
sudo chkconfig mongod on
to start mongodb everytime the server restarts
Step 1: Install git
yum install git
Now, change your directory to /var/www
cd /var/www
clone the git project using this command:
git clone https://github.com/davidpesce/learninglocker-v1-dev-env.git
- Copy vars.secret.yml.edit file to vars.secret.yml.
- Edit the vars.secret.yml file following the instructions detailed in the file.
- Modify the learninglocker file in the group_vars directory by specifying the ll_repo and ll_repo_version.
If you need to use a proxy, please see the proxy fork of this repository.
This section explains two use cases of this project:
- Create one VM machine with LL installed.
- Create two VM machines with LL installed: one for the webserver and the other for the database.
To create a virtual machine and provision it with LearningLocker, simply run:
vagrant up
If the installation is completed successfully, you will be able to:
- Access LL through your web browser: http://localhost:8082
- Connect to the machine:
vagrant ssh
To create a virtual machine and provision it with LearningLocker, modify the Vagrantfile: From this:
machines_file ||= './vagrant/one_machine'
To this:
machines_file ||= './vagrant/two_machines'
If the installation is completed successfully, you will be able to:
- Access LL through your web browser: http://localhost:8082
- Connect to the machines:
vagrant ssh ll-web
vagrant ssh ll-db
To create this I relied heavily on the Vagrant/Ansible playbook written by Aitor Gómez-Goiri that can be found here: https://github.com/gomezgoiri/learninglocker-centos7