Skip to content

Commit 974cab9

Browse files
committed
Added CONTRIBUTING.md and pulled the Contributing block out of README.md. Added instructions to create an account on Assembly
1 parent 07804ba commit 974cab9

File tree

2 files changed

+174
-148
lines changed

2 files changed

+174
-148
lines changed

CONTRIBUTING.md

Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
# Contributing
2+
3+
There are a couple of steps you need to take before contributing:
4+
5+
1. Go to [https://assemblymade.com](https://assemblymade.com) and sign up.
6+
2. Link your GitHub account to your Assembly account in your profile settings.
7+
3. Create a new WIP at [https://assemblymade.com/coderwall/wips](https://assemblymade.com/coderwall/wips).
8+
9+
Then just go ahead, fork the repo & issue a pull request. You're on your way to having a stake in Helpful.
10+
11+
## External Dependencies
12+
13+
### Stripe configuration
14+
15+
You'll need to set up a test account with Stripe for local development until this dependency is refactored out of development/test.
16+
17+
## Github configuration
18+
19+
You will need a Github application configured for local development until this dependency is refactored out of development/test.
20+
21+
https://github.com/settings/applications/new
22+
23+
## How to run Coderwall locally.
24+
25+
We use Vagrant to isolate all of our dependencies without polluting your normal working environment.
26+
27+
You're free to not use Vagrant but by the time you're done setting up you'll probably already have given up and installed Vagrant.
28+
29+
### How to work on Coderwall using Vagrant on VirtualBox
30+
31+
Sure you could download and install all the dependencies, services, and whatnot
32+
on to your local workstation but ain't nobody got time for that mess.
33+
34+
To save time and headaches we use Vagrant. Vagrant is a automation tool for
35+
VirtualBox that will help you spin up a virtual environment with pretty much
36+
everything in place and ready for you to start hacking (even on Windows!)
37+
38+
Here's everything you need to get started working on Coderwall with Vagrant TODAY!
39+
40+
*At the time of writing this document we were using VirtualBox 4.3.10 and Vagrant 1.6.2.*
41+
42+
#### Vagrant! I already know what to do.
43+
44+
__If you're an experienced Vagrant user then you can fetch the base box and register it yourself.__
45+
46+
There's only a VirtualBox basebox right now.
47+
48+
vagrant box add coderwall http://cdn.coderwall.com/vagrant/coderwall.box
49+
50+
#### Vagrant? VirtualBox? Let's take this one step at a time.
51+
52+
1. **Install VirtualBox**
53+
54+
Grab the VirtualBox installer from **[here](https://www.virtualbox.org/wiki/Downloads)**.
55+
56+
_At the time of writing this documentation the current version is VirtualBox 4.3.10._
57+
58+
You don't have to install the VirtualBox 4.3.10 Oracle VM VirtualBox Extension Pack
59+
but I recommend installing it for the extra drivers.
60+
61+
2. **Install Vagrant**
62+
63+
Grab the Vagrant installer from **[here](http://www.vagrantup.com/downloads.html)**.
64+
65+
_At the time of writing this documentation the current version is Vagrant 1.6.2._
66+
67+
Follow the installation instructions for your platform on the Vagrant download page.
68+
69+
After installing Vagrant we need to add a couple plugins.
70+
71+
If you're on a OS X/Linux system you can install the plugins by running:
72+
73+
vagrant plugin install vagrant-vbguest
74+
75+
The vagrant-vbguest plugin will each help with keeping the VirtualBox Guest Additions up-to-date.
76+
77+
3. **Git assemblymade/coderwall**
78+
79+
mkdir -p ~/assemblymade
80+
cd ~/assemblymade
81+
git clone git@github.com:assemblymade/coderwall.git
82+
83+
I am going to assume that the project is cloned into your home directory in
84+
and into a directory structure like `~/assemblymade/coderwall`.
85+
86+
4. **Fire it up! Fire it up! Fire it up!**
87+
88+
Now that you've got VirtualBox and Vagrant installed with the source code
89+
cloned in `~/assemblymade/coderwall` we can start up the Vagrant instance.
90+
91+
cd ~/assemblymade/coderwall
92+
vagrant up
93+
94+
You will likely be prompted for your `sudo` password to allow VirtualBox
95+
to mount the shared folder using NFS.
96+
97+
Since this is probably the first time you're running this command it's going
98+
to take a VERY long time (bandwidth willing) to run. This is because Vagrant
99+
needs to fetch the Coderwall base box from the Internet and it's about 1GB.
100+
Fortunately that really only has to be done once (unless the base box get's
101+
updated but that's another story).
102+
103+
Once Vagrant reports that you're booted up and ready to go then you'll be
104+
able to SSH into the local vm similiar to any other remote box.
105+
106+
# still in ~/assemblymade/coderwall
107+
vagrant ssh
108+
# whoa!
109+
pwd
110+
hostname
111+
ls -al
112+
# We're not in localhost any longer... well, you get what I mean
113+
114+
Now that you're SSH'ed into the Vagrant VM it's time to run the app.
115+
116+
# we're still SSH'ed into Vbox
117+
cd ~/assemblymade
118+
rvm current # should be ruby-2.1.0@coderwall
119+
bundle check # should be a response that everything's good
120+
bundle exec rails server
121+
122+
If all went well the Rails server should start up on PORT 3000.
123+
124+
Now go open your favorite web browser on you host machine and
125+
navigate to `http://localhost:3000`.
126+
127+
If all goes well (and if it doesn't then check if another app is
128+
running on port 3000 and if there's any logging output being displayed
129+
in the window you were running Vagrant in) then you're going to be
130+
looking at the Coderwall homepage.
131+
132+
Congratulations! NOW GET TO WORK! Enough dilly-dallying with your devenv.
133+
134+
5. **Hackety Hack!**
135+
136+
Vagrant is powerful not just because it can abstract away the mess of
137+
managing a crazy, complicated development environment while ensuring everyone
138+
has a common platform to work on. It's also powerful because it will still
139+
let you have whatever crazy, complicated editors and tools to work on your
140+
code while abstracting away the nasty details of installing and configuring Postgres.
141+
142+
If you're on your host computer and navigate to `~/assemblymade/coderwall` (we're all there, right?)
143+
and make changes to your code while Vagrant is running you'll be able to see the changes
144+
reflected in Vagrant immediately. Try this.
145+
146+
cd ~/assemblymade/coderwall
147+
echo Hello, `whoami` from `hostname` >> HELLO.txt
148+
vagrant ssh
149+
cd ~/assemblymade
150+
cat HELLO.txt #whoa.
151+
echo Hello, `whoami` from `hostname` >> HELLO.txt
152+
exit
153+
cat HELLO.txt # wah-wah-wee-wa!
154+
rm -f HELLO.txt # yeah, it's deleted in the other spot too.
155+
156+
Yeah, that's pretty awesome. Remember that NFS thing we glossed over earlier? That's
157+
the mechanism that Vagrant set up with VirtualBox to transparently synchronize your
158+
local folder with the folder on the VM. Now you can edit and manage your files from
159+
the comfort of your favorite OS without having to worry about copying them to the VM.
160+
161+
6. **All done.**
162+
163+
When you're ready to call it a day and want to turn the VM off you have two options.
164+
165+
You can either "turn the VM off" using `vagrant halt` or you can suspend the VM using `vagrant suspend`.
166+
167+
Either way when you're ready to resume working just `vagrant up` and you're good to go.
168+
169+
7. **Thanks**
170+
171+
I hope you enjoy working with Vagrant as much as we do and feel free to ask questions
172+
if you get stuck or have a problem. You're probably not alone and even if you're the
173+
first to encounter a rough patch you won't be the last.

README.md

Lines changed: 1 addition & 148 deletions
Original file line numberDiff line numberDiff line change
@@ -8,154 +8,7 @@ A community for developers to unlock & share new skills.
88

99
## Getting Started
1010

11-
TODO: Describe Stripe configuration
12-
TODO: Describe GitHub configuration https://github.com/settings/applications/new
13-
14-
### How to work on Coderwall using Vagrant on VirtualBox
15-
16-
Sure you could download and install all the dependencies, services, and whatnot
17-
on to your local workstation but ain't nobody got time for that mess.
18-
19-
To save time and headaches we use Vagrant. Vagrant is a automation tool for
20-
VirtualBox that will help you spin up a virtual environment with pretty much
21-
everything in place and ready for you to start hacking (even on Windows!)
22-
23-
Here's everything you need to get started working on Coderwall with Vagrant TODAY!
24-
25-
*At the time of writing this document we were using VirtualBox 4.3.10 and Vagrant 1.6.2.*
26-
27-
#### Vagrant! I already know what to do.
28-
29-
__If you're an experienced Vagrant user then you can fetch the base box and register it yourself.__
30-
31-
There's only a VirtualBox basebox right now.
32-
33-
vagrant box add coderwall http://cdn.coderwall.com/vagrant/coderwall.box
34-
35-
#### Vagrant? VirtualBox? Let's take this one step at a time.
36-
37-
1. **Install VirtualBox**
38-
39-
Grab the VirtualBox installer from **[here](https://www.virtualbox.org/wiki/Downloads)**.
40-
41-
_At the time of writing this documentation the current version is VirtualBox 4.3.10._
42-
43-
You don't have to install the VirtualBox 4.3.10 Oracle VM VirtualBox Extension Pack
44-
but I recommend installing it for the extra drivers.
45-
46-
2. **Install Vagrant**
47-
48-
Grab the Vagrant installer from **[here](http://www.vagrantup.com/downloads.html)**.
49-
50-
_At the time of writing this documentation the current version is Vagrant 1.6.2._
51-
52-
Follow the installation instructions for your platform on the Vagrant download page.
53-
54-
After installing Vagrant we need to add a couple plugins.
55-
56-
If you're on a OS X/Linux system you can install the plugins by running:
57-
58-
vagrant plugin install vagrant-vbguest
59-
60-
The vagrant-vbguest plugin will each help with keeping the VirtualBox Guest Additions up-to-date.
61-
62-
3. **Git assemblymade/coderwall**
63-
64-
mkdir -p ~/assemblymade
65-
cd ~/assemblymade
66-
git clone git@github.com:assemblymade/coderwall.git
67-
68-
I am going to assume that the project is cloned into your home directory in
69-
and into a directory structure like `~/assemblymade/coderwall`.
70-
71-
4. **Fire it up! Fire it up! Fire it up!**
72-
73-
Now that you've got VirtualBox and Vagrant installed with the source code
74-
cloned in `~/assemblymade/coderwall` we can start up the Vagrant instance.
75-
76-
cd ~/assemblymade/coderwall
77-
vagrant up
78-
79-
You will likely be prompted for your `sudo` password to allow VirtualBox
80-
to mount the shared folder using NFS.
81-
82-
Since this is probably the first time you're running this command it's going
83-
to take a VERY long time (bandwidth willing) to run. This is because Vagrant
84-
needs to fetch the Coderwall base box from the Internet and it's about 1GB.
85-
Fortunately that really only has to be done once (unless the base box get's
86-
updated but that's another story).
87-
88-
Once Vagrant reports that you're booted up and ready to go then you'll be
89-
able to SSH into the local vm similiar to any other remote box.
90-
91-
# still in ~/assemblymade/coderwall
92-
vagrant ssh
93-
# whoa!
94-
pwd
95-
hostname
96-
ls -al
97-
# We're not in localhost any longer... well, you get what I mean
98-
99-
Now that you're SSH'ed into the Vagrant VM it's time to run the app.
100-
101-
# we're still SSH'ed into Vbox
102-
cd ~/assemblymade
103-
rvm current # should be ruby-2.1.0@coderwall
104-
bundle check # should be a response that everything's good
105-
bundle exec rails server
106-
107-
If all went well the Rails server should start up on PORT 3000.
108-
109-
Now go open your favorite web browser on you host machine and
110-
navigate to `http://localhost:3000`.
111-
112-
If all goes well (and if it doesn't then check if another app is
113-
running on port 3000 and if there's any logging output being displayed
114-
in the window you were running Vagrant in) then you're going to be
115-
looking at the Coderwall homepage.
116-
117-
Congratulations! NOW GET TO WORK! Enough dilly-dallying with your devenv.
118-
119-
5. **Hackety Hack!**
120-
121-
Vagrant is powerful not just because it can abstract away the mess of
122-
managing a crazy, complicated development environment while ensuring everyone
123-
has a common platform to work on. It's also powerful because it will still
124-
let you have whatever crazy, complicated editors and tools to work on your
125-
code while abstracting away the nasty details of installing and configuring Postgres.
126-
127-
If you're on your host computer and navigate to `~/assemblymade/coderwall` (we're all there, right?)
128-
and make changes to your code while Vagrant is running you'll be able to see the changes
129-
reflected in Vagrant immediately. Try this.
130-
131-
cd ~/assemblymade/coderwall
132-
echo Hello, `whoami` from `hostname` >> HELLO.txt
133-
vagrant ssh
134-
cd ~/assemblymade
135-
cat HELLO.txt #whoa.
136-
echo Hello, `whoami` from `hostname` >> HELLO.txt
137-
exit
138-
cat HELLO.txt # wah-wah-wee-wa!
139-
rm -f HELLO.txt # yeah, it's deleted in the other spot too.
140-
141-
Yeah, that's pretty awesome. Remember that NFS thing we glossed over earlier? That's
142-
the mechanism that Vagrant set up with VirtualBox to transparently synchronize your
143-
local folder with the folder on the VM. Now you can edit and manage your files from
144-
the comfort of your favorite OS without having to worry about copying them to the VM.
145-
146-
6. **All done.**
147-
148-
When you're ready to call it a day and want to turn the VM off you have two options.
149-
150-
You can either "turn the VM off" using `vagrant halt` or you can suspend the VM using `vagrant suspend`.
151-
152-
Either way when you're ready to resume working just `vagrant up` and you're good to go.
153-
154-
7. **Thanks**
155-
156-
I hope you enjoy working with Vagrant as much as we do and feel free to ask questions
157-
if you get stuck or have a problem. You're probably not alone and even if you're the
158-
first to encounter a rough patch you won't be the last.
11+
Please see our CONTRIBUTING.md for instructions on how to get started working on Coderwall.
15912

16013
## Built With
16114

0 commit comments

Comments
 (0)