Browse files

Separated local and remote scripts

  • Loading branch information...
1 parent eb97917 commit ed91467073a58a7714385b535cd3180bcd61f47e @joeyates committed Mar 10, 2012
View
11 README.md
@@ -8,9 +8,6 @@ Stages
# Usage
-In the script names 'remote\_' indicates a script run remotely,
-i.e. not from the host onto which we are installing.
-
## Environment Setup
Set the following environment variables:
@@ -19,21 +16,21 @@ Set the following environment variables:
* HOME\_COOKING\_USER: an existing user on the remote host which has sudo permissions
```shell
-$ . bin/remote_setup_environment.sh
+$ . bin/setup_environment.sh
Host address/name: example.com
Existing user: user
```
## Install dependencies
```shell
-$ bin/remote_install_dependencies.sh
+$ bin/install_dependencies.sh
```
## Create user
```shell
-$ bin/remote_create_user.sh
+$ bin/create_user.sh
user@example.com's password:
[sudo] password for user:
Set password for joe
@@ -48,7 +45,7 @@ Connection to example.com closed.
Run chef-solo on the host.
```shell
-$ bin/remote_bootstrap.sh
+$ bin/bootstrap.sh
joe@example.com's password:
...
joe@example.com's password:
View
9 assets/bootstrap.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+mkdir -p .install
+cd .install
+rm -rf home-cooking
+git clone git://github.com/joeyates/home-cooking.git
+cd home-cooking
+sudo chef-solo -c chef-solo.rb -j attributes.js -u root
+
View
16 bin/bootstrap.sh
@@ -1,9 +1,11 @@
-#!/bin/sh
+if [[ -z "$HOME_COOKING_HOST" ]]; then
+ echo "First run:
+. bin/remote_setup_environment.sh"
+ exit
+fi
-mkdir -p .install
-cd .install
-rm -rf home-cooking
-git clone git://github.com/joeyates/home-cooking.git
-cd home-cooking
-sudo chef-solo -c chef-solo.rb -j attributes.js -u root
+BIN_PATH=`dirname $0`
+
+scp $BIN_PATH/../assets/bootstrap.sh $HOME_COOKING_HOST:
+ssh -t $HOME_COOKING_HOST ./bootstrap.sh
View
0 bin/remote_create_user.sh → bin/create_user.sh
File renamed without changes.
View
0 bin/remote_install_dependencies.sh → bin/install_dependencies.sh
File renamed without changes.
View
11 bin/remote_bootstrap.sh
@@ -1,11 +0,0 @@
-if [[ -z "$HOME_COOKING_HOST" ]]; then
- echo "First run:
-. bin/remote_setup_environment.sh"
- exit
-fi
-
-BIN_PATH=`dirname $0`
-
-scp $BIN_PATH/bootstrap.sh $HOME_COOKING_HOST:
-ssh -t $HOME_COOKING_HOST ./bootstrap.sh
-
View
0 bin/remote_setup_environment.sh → bin/setup_environment.sh
File renamed without changes.

0 comments on commit ed91467

Please sign in to comment.