README.md 3.47 KB
Newer Older
David Haynes's avatar
David Haynes committed
1
# Go
Jean Michel Rouly's avatar
Jean Michel Rouly committed
2

David Haynes's avatar
David Haynes committed
3
[![build status](https://git.gmu.edu/srct/go/badges/master/build.svg)](https://git.gmu.edu/srct/go/commits/2.2-dev) [![coverage report](https://git.gmu.edu/srct/go/badges/2.2-dev/coverage.svg)](https://git.gmu.edu/srct/go/commits/2.2-dev)
Jean Michel Rouly's avatar
Jean Michel Rouly committed
4

David Haynes's avatar
David Haynes committed
5
#### A project of [GMU SRCT](http://srct.gmu.edu).
6

David Haynes's avatar
David Haynes committed
7 8 9
Go is a drop-in URL shortening service. This project aims to provide an easy to use
URL branding service for institutions that wish to widely disseminate information
without unnecessarily outsourcing branding.
David Haynes's avatar
David Haynes committed
10

David Haynes's avatar
David Haynes committed
11 12
Go is currently a `Python 2.7` project written in the `Django` web framework, with
`MySQL` as our backend database.
13

David Haynes's avatar
David Haynes committed
14
# Setup instructions for local development
15

David Haynes's avatar
David Haynes committed
16
---
17

David Haynes's avatar
David Haynes committed
18 19 20 21
Go currently supports developers on Linux, macOS and Windows platforms through
both the Docker and Vagrant virtualization platforms. You may use either one
though we have included instructions for manual setup as well. Here's our walk-through
of steps we will take:
22

David Haynes's avatar
David Haynes committed
23 24 25
1. Install `git` on your system.
2. Clone the Go codebase.
3. Get Go up and running with the method of your choice.
Zosman's avatar
Zosman committed
26

David Haynes's avatar
David Haynes committed
27
## 1) Install `git` on your system.
Zosman's avatar
Zosman committed
28

David Haynes's avatar
David Haynes committed
29
`git` is the version control system used for SRCT projects.
Zosman's avatar
Zosman committed
30

David Haynes's avatar
David Haynes committed
31
### On Linux Based Systems
Zosman's avatar
Zosman committed
32

David Haynes's avatar
David Haynes committed
33
Open a terminal and run the following command:
mdsecurity's avatar
mdsecurity committed
34

David Haynes's avatar
David Haynes committed
35
    $ sudo apt-get update
Robert Hitt's avatar
Robert Hitt committed
36

David Haynes's avatar
David Haynes committed
37
This retrieves links to the most up-to-date and secure versions of your packages.
Robert Hitt's avatar
Robert Hitt committed
38

David Haynes's avatar
David Haynes committed
39
Next, with:
40

David Haynes's avatar
David Haynes committed
41
    $ sudo apt-get install git
David Haynes's avatar
David Haynes committed
42

David Haynes's avatar
David Haynes committed
43
you install `git` onto your system.
44

David Haynes's avatar
David Haynes committed
45
### On macOS
Zosman's avatar
Zosman committed
46

David Haynes's avatar
David Haynes committed
47 48 49 50
We recommend that you use 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.
51

David Haynes's avatar
David Haynes committed
52
To get homebrew, run the following command in a terminal:
David Haynes's avatar
David Haynes committed
53

David Haynes's avatar
David Haynes committed
54
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)
55

David Haynes's avatar
David Haynes committed
56 57
**Note**: You do NOT need to use `sudo` when running any Homebrew commands, and
it likely won't work if you do.
David Haynes's avatar
David Haynes committed
58

David Haynes's avatar
David Haynes committed
59
Next, to make sure Homebrew is up to date, run:
60

David Haynes's avatar
David Haynes committed
61
    $ brew update
Zosman's avatar
Zosman committed
62

David Haynes's avatar
David Haynes committed
63
Finally we can install git with `brew install git`
Zosman's avatar
Zosman committed
64

David Haynes's avatar
David Haynes committed
65
### On Windows
Zosman's avatar
Zosman committed
66

David Haynes's avatar
David Haynes committed
67 68 69
## 2) Clone 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.
70

David Haynes's avatar
David Haynes committed
71
Configure your ssh keys by following the directions at [git.gmu.edu/help/ssh/README](http://git.gmu.edu/help/ssh/README).
David Haynes's avatar
David Haynes committed
72

David Haynes's avatar
David Haynes committed
73
Now, on your computer, navigate to the directory in which you want to download the project (perhaps one called development/ or something similar), and run
David Haynes's avatar
David Haynes committed
74

David Haynes's avatar
David Haynes committed
75
`$ git clone git@git.gmu.edu:srct/go.git`
David Haynes's avatar
David Haynes committed
76

David Haynes's avatar
David Haynes committed
77
## 3) Get Go up and running with the method of your choice.
78

David Haynes's avatar
David Haynes committed
79
### Docker
David Haynes's avatar
David Haynes committed
80

David Haynes's avatar
David Haynes committed
81
[docker configuration on the wiki](https://git.gmu.edu/srct/go/wikis/docker-configuration)
David Haynes's avatar
David Haynes committed
82

David Haynes's avatar
David Haynes committed
83
### Vagrant
David Haynes's avatar
David Haynes committed
84

David Haynes's avatar
David Haynes committed
85
[config](https://git.gmu.edu/srct/go/wikis/vagrant-configuration)
David Haynes's avatar
David Haynes committed
86

David Haynes's avatar
David Haynes committed
87
[usage](https://git.gmu.edu/srct/go/wikis/vagrant-usage)
David Haynes's avatar
David Haynes committed
88

David Haynes's avatar
David Haynes committed
89
### Manual Setup
David Haynes's avatar
David Haynes committed
90

David Haynes's avatar
David Haynes committed
91
# On Contributing
David Haynes's avatar
David Haynes committed
92

David Haynes's avatar
David Haynes committed
93
---
David Haynes's avatar
David Haynes committed
94

David Haynes's avatar
David Haynes committed
95 96
I encourage you to join the [#go channel](https://srct.slack.com/messages/go/details/) in SRCT's [Slack Group](https://srct.slack.com)
if you have any questions on setup or would like to contribute.
David Haynes's avatar
David Haynes committed
97 98


David Haynes's avatar
David Haynes committed
99
# Deployment
100 101 102 103 104 105

In order to expire links, you need to set up a cron job to run the manage.py
expirelinks command regularly. A sample cron script is available in the
repository and is named go-cleanlinks.cron. Drop this in cron.hourly and
change the paths so that they point to the virtualenv activate script and
manage.py.
David Haynes's avatar
David Haynes committed
106

David Haynes's avatar
David Haynes committed
107 108
---
**Note:**
David Haynes's avatar
David Haynes committed
109

110
Link by Viktor Vorobyev from the Noun Project.