- Navigate to Vagrant Download Page
- Click on the proper package for your operating system and architecture, we will be using MAC OSX
- After clicking on Universal (32 and 64-bit) Vagrant will begin to download. Once the download is completed, click on it.
- Next double-click on Vagrant.pkg to open the package. You will be brought to the Vagrant installer.
- Click “Continue” to be brought to the next page of the installer.
- Select Macintosh HD as the installation destination, then click on “Continue”.
- Once you have selected the disk where you want to install Vagrant click “Install”.
- The Installer will prompt you for your username and password. Then click “Install Software”.
- If the installation was successful you can close the installer and get ready to setup VirtualBox.
-
Navigate to the Virtualbox Download Page.
-
Then click on "amd64", right next to the "VirtualBox 5.0.10 for OS X hosts" label.
-
After completing the download open the VirtualBox installer. Click on the “VirtualBox.pkg” icon.
- The installer will prompt you to run a program to determine if the software can be installed, click “Continue”.
- If the program has successfully determined that you can install the software the installer will remain open, press continue. Then select “Macintosh HD” has your installation destination. Click “Continue”.
- After selecting the destination, click “Install”.
- Installer will prompt you for your username and password, then click “Install Software”.
-
Once your computer has successfully finished installing Oracle VM VirtualBox you will be directed to the last page of the installer. Click “Close”.
-
Open your Terminal application, Terminal’s default location is in your home/applications/utilities folder. You can also open Terminal by searching “Terminal” in spotlight search.
- In Terminal, type or copy and paste
git clone [email protected]:fossasia/open-event-server.git
after entering commands in Terminal press the "Enter" key.
- Then type or copy and paste
cd open-event-server
(cd means change directory)
- You will then change into the “open-event-server” directory.
- In Terminal in the “open-event-server” directory, type
vagrant up
to bring up the virtual machine. This will start installation of a ubuntu box within which the server will run with all its components. If after typing “vagrant up” you received an error stating “valid providers not found ….”, typevagrant up --provider=virtualbox
- This step may take a long time depending on your computer and internet connection
- You will see a bunch of output related to the provisioning of the virtual machine. Something like below:
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'ubuntu/trusty64'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'ubuntu/trusty64' is up to date...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH
......
==> default: Preparing to unpack .../libjpeg8_8c-2ubuntu8_amd64.deb ...
==> default: Unpacking libjpeg8:amd64 (8c-2ubuntu8) ...
==> default: Selecting previously unselected package libjbig0:amd64.
==> default: Preparing to unpack .../libjbig0_2.0-2ubuntu4.1_amd64.deb ...
==> default: Unpacking libjbig0:amd64 (2.0-2ubuntu4.1) ...
==> default: Selecting previously unselected package libtiff5:amd64.
==> default: Preparing to unpack .../libtiff5_4.0.3-7ubuntu0.3_amd64.deb ...
......
Just wait patiently, it will take about 10-15 minutes depending on your computer and the Internet connection. Go sip a coffee in the meantime.
- Once the box is setup up you can enter it by
ssh
in order to examine its contents. - With Vagrant, the project is automatically synced up, the changes you make to the models and project files are reflected within the vagrant VM.
- Now ssh into the box
vagrant ssh
This will bring you to the root directory of the Virtual Machine.
- Notice that the top of the Terminal window no longer says “bash”. Now type
cd /vagrant
- (optional)In Terminal, type “ls” to view the files of the directory.
- To run the app, type
python3 create_db.py
this step should exit normally without raising any errors. If Terminal does report an error typeecho $DATABASE_URL
to double check your database configuration.
- Next, type
python3 manage.py runserver -h 0.0.0.0 -p 5000
- Now your server is up and running. To view the admin page go to localhost:8001
- Congratulations! If you see the admin page you have successfully configured the application!
- If you want to shutdown the server press “CTRL + C”.