Skip to content

Commit

Permalink
Merge pull request ClojureBridge#126 from AustinClojure/master
Browse files Browse the repository at this point in the history
Fix for ClojureBridge#117 removing mentions of heroku
  • Loading branch information
k4y3ff committed Feb 8, 2015
2 parents 5d67015 + f830bba commit de18da5
Show file tree
Hide file tree
Showing 7 changed files with 69 additions and 223 deletions.
Binary file added outline/img/os_x/testing-browser.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added outline/img/os_x/testing-lein-run.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 1 addition & 2 deletions outline/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ By the end of these instructions, you will have the following installed:
* Java, a "virtual machine" that Clojure runs atop of
* Leiningen, a tool for running Clojure programs
* Light Table, an editor for Clojure and other programming languages
* The Heroku Toolbelt, a program for putting your Clojure application on the web
* Git, a program for managing your program's code, which is included in the Heroku Toolbelt
* Git, a program for managing your program's code

## Instructions by operating system

Expand Down
65 changes: 13 additions & 52 deletions outline/setup_osx.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ OS X Setup
* Make sure Java is installed
* Get Leiningen installed
* Get LightTable installed
* Get Heroku installed
* Test installation

## Starting a terminal
Expand Down Expand Up @@ -37,7 +36,7 @@ Otherwise, type this in the terminal:
git config --global user.name "Your Actual Name"
git config --global user.email "Your Actual Email"
```
TIP: Use the same email address for heroku, git, github, and ssh.
TIP: Use the same email address for git, github, and ssh.

Verify by typing this in the terminal:

Expand Down Expand Up @@ -98,39 +97,10 @@ prompt. Click "Open".

<img alt="Light Table first-run dialog" src="img/os_x/light-table-first-run-dialog@2x.png" width="595" height="290">

## Getting setup with Heroku

Heroku is the tool we will use in order to put your application online where others can see it.

First, we need to create an account. Go to [Heroku](http://heroku.com) and click the "Sign up" link.

![Heroku step 1](img/heroku-step1.png)

You will be taken to a form where you need to enter your email address in order to sign up. Fill out that form, and you will be sent an email with a link to click to continue the signup process.

![Heroku step 2](img/heroku-step2.png)

After clicking on the link, you will be taken to another form where you will need to choose a password. Choose one and enter it twice.

![Heroku step 3](img/heroku-step3.png)

After all that, you should be at your Heroku dashboard which verifies that you've successfully created your account. Next, you will need to download the Heroku Toolbelt. Download it from [toolbelt.heroku.com](https://toolbelt.heroku.com/).

This will download a .pkg file. Double-click it to install the Heroku Toolbelt and follow all prompts from the installation wizard. You will need your OS X account password to complete installation. If you are prompted to create an SSH key, say yes. It may also prompt you to install git. Once the Heroku Toolbelt is installed, go to your terminal and run the command `heroku login`. You will be prompted for your email and password on Heroku. If you enter them and the command ends successfully, congratulations!

![Heroku login](img/os_x/heroku_login.png)

To make your computer automatically communicate securely with Heroku, you will need to set up SSH. First, go to your terminal and run the command `ssh-keygen`. When prompted for inputs, simply press Return until the process has finished.

![Heroku SSH setup](img/os_x/heroku_ssh_setup.png)

Finally, complete your SSH setup with Heroku by running the command `heroku keys:add`.

![Heroku key-add](img/os_x/heroku_key_add.png)

## Testing your setup

You have set up Java, Leiningen, LightTable, Git, and Heroku on your computer--all the tools you will need for this course. Before starting, we need to test them out.
You have set up Java, Leiningen, LightTable, and Git on your computer--all the tools you will need for this course. Before starting, we need to test them out.

Go to your terminal and run the following command:

Expand Down Expand Up @@ -170,33 +140,24 @@ At the bottom left of the screen, you will see a cube moving and some text about

If that worked, great! Close LightTable.

We only have one more thing to test, Heroku.

Go back to your terminal. You should still be in the `clojure-sample` directory.

Run this command:
Finally, let's make sure the application you downloaded will run properly. To test this, you will use Leiningen to run the application on your computer. As this is a (very simple) web application, you should be able to use a web browser to see it runnning in all its humble glory. Let's start with

`heroku create`
```
lein run
```

There should be output about something being created. A URL will be displayed. Look at the following example:
This tells Leiningen to run your application. Different applications run in different ways - this one starts up it's own little webserver on your computer. If this is the first time you've run a web application, the output in the Terminal window (see below) may not make much sense, so let's test the application in a browser.

![Testing heroku create](img/os_x/testing-step5.png)
![Testing lein run](img/os_x/testing-lein-run.png)

Next, run the following commands:
You now need to open a web browser (Chrome, Firefox, Safari, etc) and point it towards the application running on your computer. Enter the following URL to access your application:

```
git push heroku master
heroku open
http://localhost:8080/
```

Enter "yes" if you are asked if you are sure you want to connect, like in the following image:

![Connecting via SSH](img/os_x/testing-step6.png)

Your browser should open (and take a long time to load), and you should see a website like the following:

![Testing heroku working](img/os_x/testing-step7.png)
This is what your browser should look like if everything has been successful.

If your browser does not open after running `heroku open`, start a browser and go to the URL displayed after you ran `heroku create`.
![Testing in browser](img/os_x/testing-browser.png)

Congratulations! That website is running code you have on your computer that you have uploaded. You have actually made a very simple Clojure app, and your computer is all set up to make more.
Congratulations! You have actually made a very simple Clojure app, and your computer is all set up to make more.
64 changes: 19 additions & 45 deletions outline/setup_ubuntu.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Ubuntu Setup
* Make sure Java is installed
* Get Leiningen installed
* Get Light Table installed
* Get Heroku installed (includes Git)
* Get Git installed
* Test installation

## Starting a terminal
Expand Down Expand Up @@ -84,31 +84,12 @@ You should see a window like this:
Name the launcher LightTable. Type the path to the command `/usr/local/bin/LightTable/LightTable`. Click the icon. The LightTable icon can be found at `/usr/local/bin/LightTable/core/img/lticon.png`.


## Getting setup with Heroku
## Installing Git

Heroku is the tool we will use in order to put your application online where others can see it.
See if you already have Git installed with `git version`.
If the `git` command is not found, install it with this command in the terminal:

First, we need to create an account. Go to [Heroku](http://heroku.com) and click the "Sign up" link.

![Heroku step 1](img/heroku-step1.png)

You will be taken to a form where you need to enter your email address in order to sign up. Fill out that form, and you will be sent an email with a link to click to continue the signup process.

![Heroku step 2](img/heroku-step2.png)

After clicking on the link, you will be taken to another form where you will need to choose a password. Choose one and enter it twice.

![Heroku step 3](img/heroku-step3.png)

After all that, you should be at your Heroku dashboard. There will be a link on the dashboard to download the Heroku Toolbelt. Download it now.

![Heroku dashboard](img/ubuntu/heroku_dashboard_ubuntu.png)

If you do not see this link on your dashboard, you can download the toolbelt from [toolbelt.heroku.com](https://toolbelt.heroku.com/).

This will take you too a page with a terminal command. Copy this command and paste it into your terminal. Once the Heroku Toolbelt is installed, run the command `heroku login`. You will be prompted for your email and password on Heroku. If you are prompted to create an SSH key, say yes. If you enter them and the command ends successfully, congratulations!

## Configuring Git
`sudo apt-get install git`

If you've used Git before then you should already have user.name and user.email configured.
Otherwise, type this in the terminal:
Expand All @@ -117,7 +98,7 @@ Otherwise, type this in the terminal:
git config --global user.name "Your Actual Name"
git config --global user.email "Your Actual Email"
```
TIP: Use the same email address for heroku, git, github, and ssh.
TIP: Use the same email address for git, github, and ssh.

Verify by typing this in the terminal:

Expand All @@ -131,7 +112,7 @@ Expected result:

## Testing your setup

You have set up Java, Leiningen, Light Table, Git, and Heroku on your computer--all the tools you will need for this course. Before starting, we need to test them out.
You have set up Java, Leiningen, Light Table, and Git on your computer--all the tools you will need for this course. Before starting, we need to test them out.

Go to your terminal and run the following command:

Expand Down Expand Up @@ -169,33 +150,26 @@ At the bottom of the screen, you will see a cube moving and some text about conn

![Testing Light Table - running in the instarepl](img/ubuntu/testing-step4.png)

If that worked, great! Close Light Table. We only have one more thing to test, Heroku.
If that worked, great! Close Light Table.

Go back to your terminal. You should still be in the `clojure-sample` directory.
Finally, let's make sure the application you downloaded will run properly. To test this, you will use Leiningen to run the application on your computer. As this is a (very simple) web application, you should be able to use a web browser to see it runnning in all its humble glory. Let's start with

Run this command:

`heroku create`
```
lein run
```

There should be output about something being created. A URL will be displayed. Look at the following example:
This tells Leiningen to run your application. Different applications run in different ways - this one starts up it's own little webserver on your computer. If this is the first time you've run a web application, the output in the Terminal window (see below) may not make much sense, so let's test the application in a browser.

![Testing heroku create](img/ubuntu/testing-step5.png)
![Testing lein run](img/ubuntu/testing-lein-run.png)

Next, run the following commands:
You now need to open a web browser (Chrome, Firefox, Safari, etc) and point it towards the application running on your computer. Enter the following URL to access your application:

```
git push heroku master
heroku open
http://localhost:8080/
```

Enter "yes" if you are asked if you are sure you want to connect, like in the following image:

![Connecting via SSH](img/ubuntu/testing-step6.png)

Your browser should open (and take a long time to load), and you should see a website like the following:

![Testing heroku working](img/ubuntu/testing-step7.png)
This is what your browser should look like if everything has been successful.

If your browser does not open after running `heroku open`, start a browser and go to the URL displayed after you ran `heroku create`.
![Testing in browser](img/ubuntu/testing-browser.png)

Congratulations! That website is running code you have on your computer that you have uploaded. You have actually made a very simple Clojure app, and your computer is all set up to make more.
Congratulations! You have actually made a very simple Clojure app, and your computer is all set up to make more.
85 changes: 18 additions & 67 deletions outline/setup_win7.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Windows 7 Setup
* Get Java installed
* Get Leiningen installed
* Get Light Table installed
* Get Heroku installed (includes Git)
* Get Git installed
* Test installation

## Starting a command prompt
Expand Down Expand Up @@ -59,55 +59,10 @@ Unzip this file (either by finding it in your Downloads folder and double-clicki

Inside the Light Table directory, there is an application called Light Table. Right-click it and choose "Pin to Start Menu" so you can start it more quickly.

## Get setup with Heroku
## Installing Git

Heroku is the tool we will use in order to put your application online where others can see it.

First, we need to create an account. Go to [Heroku](http://heroku.com) and click the "Sign up" link.

![Heroku step 1](img/heroku-step1.png)

You will be taken to a form where you need to enter your email address in order to sign up. Fill out that form, and you will be sent an email with a link to click to continue the signup process.

![Heroku step 2](img/heroku-step2.png)

After clicking on the link, you will be taken to another form where you will need to choose a password. Choose one and enter it twice.

![Heroku step 3](img/heroku-step3.png)

After all that, you should be at your Heroku dashboard. There will be a link on the dashboard to download the Heroku Toolbelt. Download it now.

![Heroku dashboard](img/heroku-dashboard.png)

You will download an .exe file. Run this executable to install the Heroku Toolbelt and follow all prompts from the installation wizard.

Before you can use Heroku, you will have to set up SSH, the way your computer communicates with Heroku.

First, look up what your user directory is. You can find it by running `echo %USERPROFILE%`. Create a place for your SSH keys by running this command:

```
mkdir "%USERPROFILE%\.ssh"
```

Then, if you have 32-bit Windows, run this command:

```
"C:\Program Files\Git\bin\ssh-keygen.exe"
```

If you have 64-bit Windows, run this command instead:

```
"C:\Program Files (x86)\Git\bin\ssh-keygen.exe"
```

The quotes are necessary on the `ssh-keygen.exe` command. When you run `ssh-keygen.exe`, you will need to type the name of your user directory - everything from "C:\" onward - plus `\.ssh\id_rsa` when it asks you where to save the key. Be careful to type everything exactly. When it asks to 'Enter passphrase' just hit Enter, then Enter again. *Look at the following example:*

![ssh-keygen](img/win7/ssh-keygen.png)

After that, close the command prompt, open it again, and run the command `heroku login`. You will be prompted for your email and password on Heroku. If you enter them and the command ends successfully, congratulations!

## Configure Git
See if you already have Git installed at the command prompt with the command `git --version`.
If not, download it from the [git-scm.com Windows download page](http://git-scm.com/download/win) and run the executable to install.

If you've used Git before then you should already have user.name and user.email configured.
Otherwise, type this in the command prompt:
Expand All @@ -116,7 +71,7 @@ Otherwise, type this in the command prompt:
git config --global user.name "Your Actual Name"
git config --global user.email "Your Actual Email"
```
TIP: Use the same email address for heroku, git, github, and ssh.
TIP: Use the same email address for git, github, and ssh.

Verify by typing this in the command prompt:

Expand All @@ -130,7 +85,7 @@ Expected result:

## Testing your setup

You have set up Java, Leiningen, Light Table, Git, and Heroku on your computer, all the tools you will need for this program. Before starting, we need to test them out. Make sure you have a terminal (OS X) or command prompt (Windows) open for testing. We will just call this a terminal from now on.
You have set up Java, Leiningen, Light Table, and Git on your computer, all the tools you will need for this program. Before starting, we need to test them out. Make sure you have a terminal (OS X) or command prompt (Windows) open for testing. We will just call this a terminal from now on.

Go to your terminal and run the following command:

Expand Down Expand Up @@ -162,33 +117,29 @@ At the bottom of the screen, you will see a cube moving and some text about conn

![Testing Light Table - running in the instarepl](img/win7/testing-step4.png)

If that worked, great! Close Light Table. We only have one more thing to test, Heroku.
If that worked, great! Close Light Table.

Go back to your terminal. You should still be in the `clojure-sample` directory.
Finally, let's make sure the application you downloaded will run properly. To test this, you will use Leiningen to run the application on your computer. As this is a (very simple) web application, you should be able to use a web browser to see it runnning in all its humble glory. Let's start with

Run this command:

`heroku create`
```
lein run
```

There should be output about something being created. A URL will be displayed. Look at the following example:
This tells Leiningen to run your application. Different applications run in different ways - this one starts up it's own little webserver on your computer. If this is the first time you've run a web application, the output in the Terminal window (see below) may not make much sense, so let's test the application in a browser.

![Testing heroku create](img/win7/testing-step5.png)
![Testing lein run](img/win7/testing-lein-run.png)

Next, run the following commands:
You now need to open a web browser (Chrome, Firefox, Safari, etc) and point it towards the application running on your computer. Enter the following URL to access your application:

```
git push heroku master
heroku open
http://localhost:8080/
```

Enter "yes" if you are asked if you are sure you want to connect.

Your browser should open (and take a long time to load) and you should see a website like the following:
This is what your browser should look like if everything has been successful.

![Testing heroku working](img/win7/testing-step6.png)
![Testing in browser](img/win7/testing-browser.png)

Congratulations! That website is running code you have on your computer that you have uploaded. You have actually made a very simple Clojure app, and your computer is all set up to make more.
Congratulations! You have actually made a very simple Clojure app, and your computer is all set up to make more.



Loading

0 comments on commit de18da5

Please sign in to comment.