Update LOCAL_SETUP.md
This commit is contained in:
@ -6,67 +6,27 @@ Install Vagrant - https://www.vagrantup.com/docs/installation/
|
|||||||
Install VirtualBox - https://www.virtualbox.org/wiki/Downloads
|
Install VirtualBox - https://www.virtualbox.org/wiki/Downloads
|
||||||
|
|
||||||
## Install and setup
|
## Install and setup
|
||||||
Create a local codeOceanRoot: mkdir /path/to/CodeOcean
|
### Clone repository
|
||||||
==> codeOceanRoot = /path/to/CodeOcean
|
Create a local codeOceanRoot: mkdir /path/to/CodeOcean ==> codeOceanRoot = /path/to/CodeOcean
|
||||||
Clone Repository to codeOceanRoot - https://github.com/openHPI/codeocean
|
Clone Repository (https://github.com/openHPI/codeocean) to codeOceanRoot
|
||||||
==> repoPath = codeOceanRoot/xikolo-hands-on-programming
|
cd codeOceanRoot
|
||||||
cd repoPath/config
|
|
||||||
duplicate .example config files (remove .example from filename)
|
|
||||||
action_mailer.yml, database.yml, secrets.yml, sendmail.yml, smtp.yml
|
|
||||||
add your local dbuser credentials to database.yml
|
|
||||||
Linux users may need to add a "host" and a "port" parameter
|
|
||||||
set path for /shared to codeOceanRoot/shared - double check this, when errors like "no target for make run available" arise, this is a likely cause. If in doubt, also check the paths in config/docker.yml match the relative structure, Linux users might need to use an absolute path)
|
|
||||||
Copy vagrant files from https://github.com/hklement/vagrant-docker to codeOceanRoot or use boot2docker
|
|
||||||
==> vagrantPath = codeOceanRoot/vagrant-docker-master
|
|
||||||
cd vagrantPath
|
|
||||||
open Vagrantfile in text editor of choice
|
|
||||||
Execute: vagrant box add ubuntu/trusty64
|
|
||||||
Execute: vagrant up
|
|
||||||
Install docker environments
|
|
||||||
export DOCKER_HOST=tcp://192.168.23.75:2375
|
|
||||||
docker pull openhpi/docker_java
|
|
||||||
docker pull openhpi/docker_ruby
|
|
||||||
docker pull openhpi/docker_python
|
|
||||||
|
|
||||||
(The following images need to be moved to openhpi/docker_[coffee|sqlite|etc.] if they are required at some point.
|
### Get Vagrant base image
|
||||||
docker pull jprberlin/ubuntu-coffee
|
vagrant box add ubuntu/trusty64
|
||||||
docker pull jprberlin/ubuntu-sqlite
|
|
||||||
docker pull jprberlin/ubuntu-sinatra
|
|
||||||
docker pull jprberlin/ubuntu-html
|
|
||||||
docker pull jprberlin/ubuntu-jruby)
|
|
||||||
|
|
||||||
cd repoPath
|
|
||||||
bundle install
|
|
||||||
(make sure Postgres is running)
|
|
||||||
Create database xikolo-hands-on-programming-development
|
|
||||||
Open postgres commandline tool: psql
|
|
||||||
mypostgresuser=# create database "xikolo-hands-on-programming-development";
|
|
||||||
rake db:schema:load
|
|
||||||
rake db:migrate
|
|
||||||
rake db:seed
|
|
||||||
Start
|
|
||||||
Start application
|
|
||||||
cd vagrantPath
|
|
||||||
vagrant up
|
vagrant up
|
||||||
cd repoPath
|
|
||||||
rails s -p 3333
|
|
||||||
Open application in browser
|
|
||||||
http://0.0.0.0:3333
|
|
||||||
Stop application
|
|
||||||
vagrant halt
|
|
||||||
|
|
||||||
Run Tests
|
### Trouble shooting
|
||||||
Setup:
|
ln -s /etc/nginx/sites-available/code_ocean /etc/nginx/sites-enabled <= Failed (no such directory)
|
||||||
Create database xikolo-hands-on-programming-test
|
|
||||||
Open postgres commandline tool: psql
|
|
||||||
mypostgresuser=# create database "xikolo-hands-on-programming-test";
|
|
||||||
|
|
||||||
Run:
|
vagrant ssh
|
||||||
Start vagrant
|
sudo apt-get install nginx
|
||||||
vagrant up
|
sudo ln -s /etc/nginx/sites-available/code_ocean /etc/nginx/sites-enabled
|
||||||
cd repoPath
|
|
||||||
export DOCKER_HOST=tcp://192.168.23.75:2375
|
|
||||||
bundle exec rspec
|
|
||||||
|
|
||||||
Login
|
### Start server
|
||||||
|
vagrant ssh
|
||||||
|
cd /vagrant
|
||||||
|
rails s -p 3000
|
||||||
|
|
||||||
|
### Login to CodeOcean
|
||||||
|
192.168.59.104:3000
|
||||||
admin@example.org:admin
|
admin@example.org:admin
|
||||||
|
Reference in New Issue
Block a user