This tutorial uses the third party Homebrew package manager for macOS, which allows you to install packages from your terminal just as easily as you could on a Linux based system. You could use another package manager (or not use one at all), but Homebrew is highly reccomended.
To get homebrew, run the following command in a terminal: `/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)`
**Note**: You do NOT need to use `sudo` when running any Homebrew commands, and it likely won't work if you do.
Next, to make sure Homebrew is up to date, run `brew update`
Finally we can install python and git with `brew install python git`
### Cloning the Go Codebase
### Cloning the Go Codebase
Now, we're going to clone down a copy of the Go codebase from [git.gmu.edu](http://git.gmu.edu/srct/go), the SRCT code respository.
Now, we're going to clone down a copy of the Go codebase from [git.gmu.edu](http://git.gmu.edu/srct/go), the SRCT code respository.
...
@@ -43,13 +55,28 @@ Now, on your computer, navigate to the directory in which you want to download t
...
@@ -43,13 +55,28 @@ Now, on your computer, navigate to the directory in which you want to download t
Finally, install these packages from the standard repositories:
Finally, install these packages from the standard repositories:
- VirtualBox
- VirtualBox
On Ubuntu:
`$ sudo apt-get install virtualbox`
`$ sudo apt-get install virtualbox`
You should be installing the latest VirtualBox version which as of time of writing is `5.0.24_Ubuntur108355`. You can verify the version number by running `vboxmanage --version`.
- Vagrant
- Vagrant
`$ sudo apt-get install vagrant`
`$ sudo apt-get install vagrant`
You should be installing the latest vagrant version which as of time of writing is `Vagrant 1.8.1`. You can verify the version number by running `vagrant -v`.
You should be installing the latest ansible version which as of time of writing is `ansible 2.1.1.0`. You can verify the version number by running `ansible --version`.
**macOS**
First, get VirtualBox from [VirtualBox.org](https://www.virtualbox.org/wiki/Downloads)
Then install Vagrant and Ansible with Homebrew with `brew install Caskroom/cask/vagrant Ansible`
## Developing with Vagrant
## Developing with Vagrant
<legend></legend>
<legend></legend>
...
@@ -62,15 +89,15 @@ Navigate to go/ and run:
...
@@ -62,15 +89,15 @@ Navigate to go/ and run:
This will setup a vm to run Go on your computer and will setup a database, install packages, etc. The first time you run `vagrant up` it may take a few minutes to setup, specifically when installing Go packages. Don't worry as progressive times it will speed up.
This will setup a vm to run Go on your computer and will setup a database, install packages, etc. The first time you run `vagrant up` it may take a few minutes to setup, specifically when installing Go packages. Don't worry as progressive times it will speed up.
And that's it! Navigate to [localhost](http://127.0.0.1:8000) in your web browser to view the website.
And that's it! Navigate to [localhost:8000](http://127.0.0.1:8000) in your web browser to view the website.
### Additional Notes
### Additional Notes & Troubleshooting
The authentication service used for Go is CAS. In local development however we utilize a test server. You can log in using your CAS username for both the username and password fields.
The authentication service used for Go is CAS. In local development however we utilize a test server. You can log in using your CAS username for both the username and password fields.
The default superuser is _dhaynes3_ though this can be changed in _vagrantfile_ if you wish. You can run `$ vagrant provision` to apply this change. Be sure not to include that change in your commits.
The default superuser is _dhaynes3_ though this can be changed in _vagrantfile_ if you wish. You can run `$ vagrant provision` to apply this change. Be sure not to include that change in your commits.
For a currently undetermined reason at some points if you try to navigate to [localhost](http://127.0.0.1:8000) and you see an error like: "Conenction has been reset" then:
*Note:*For a currently undetermined reason at some points if you try to navigate to [localhost](http://127.0.0.1:8000) and you see an error like: "Conenction has been reset" then:
1.`vagrant ssh`
1.`vagrant ssh`
2.`sudo /etc/init.d/networking restart` and then `exit`
2.`sudo /etc/init.d/networking restart` and then `exit`
3.`vagrant provision` (may need to do twice)
3.`vagrant provision` (may need to do twice)
...
@@ -83,18 +110,6 @@ If you make any changes to _models.py_ you will need to re-provision the vm's da
...
@@ -83,18 +110,6 @@ If you make any changes to _models.py_ you will need to re-provision the vm's da
Please note that this will refresh the database (as in delete everything in it).
Please note that this will refresh the database (as in delete everything in it).
It is also good practice to shutdown your vm when you are done:
<atabindex="0"class="button btn btn-info btn-sm fa"role="button"data-toggle="popover"title="Not Implemented Quite Yet :("data-content="We are working on adding this feature in a future
release of Go. If you'd like to check that progress or potentially
<aclass="share"href="http://twitter.com/share?url={{ social_url }}"target="_blank"title="Share via Twitter">
<iclass="fa fa-twitter-square fa-3x"></i>
</a>
<aclass="share"href="http://www.facebook.com/share.php?u={{ social_url }}"target="_blank"title="Share via Facebook">
<iclass="fa fa-facebook-square fa-3x"></i>
</a>
<aclass="share"href="https://plus.google.com/share?url={{ social_url }}"target="_blank"title="Share via Google+">
<iclass="fa fa-google-plus-square fa-3x"></i>
</a>
<aclass="share"href="http://www.linkedin.com/shareArticle?mini=true&url={{ social_url }}&ro=false&summary=&source="target="_blank"title="Share via LinkedIn">