File tree Expand file tree Collapse file tree 1 file changed +52
-0
lines changed Expand file tree Collapse file tree 1 file changed +52
-0
lines changed Original file line number Diff line number Diff line change
1
+ HACKAKL Getting Started with OpenShift
2
+ ====================
3
+
4
+ This is a step-by-step cheat sheet for the HACKAKL workshop.
5
+
6
+ Demo restify-mongodb-atstops
7
+ ---------------------
8
+
9
+ 1 . Setup rhc client tools
10
+
11
+ rhc setup
12
+
13
+ Enter username and password and enter 'yes' authorization token
14
+
15
+ 2 . Create app (first command fails to show nodejs options)
16
+
17
+ rhc app create atstops nodejs
18
+ cd atstops
19
+ ls -la
20
+ rhc cartridge add mongodb-2.4
21
+
22
+ 3 . Login to OpenShift Online web console and show atstops app
23
+
24
+ 4 . Clone and deploy restify-mongodb-parks project
25
+
26
+ git remote add upstream https://github.com/ryanj/restify-mongodb-parks
27
+ git pull -s recursive -X theirs upstream master
28
+ git push
29
+
30
+ 5 . Get the app URL and browse to the map
31
+
32
+ rhc domain show
33
+
34
+ 6 . Edit .openshift/action_hooks/deploy and insert the following line before _ popd_
35
+
36
+ npm run flushdb
37
+
38
+ This makes sure MongoDB data set is cleaned up for every deploy
39
+
40
+ 7 . Edit server.js and insert the following lines after call to _ selectAll_
41
+
42
+ app.get('/initdb', db.initDB);
43
+ app.get('/flushdb', db.flushDB);
44
+
45
+ This allows REST urls for deleting and importing data from the frontend
46
+
47
+ 8 . Deploy changes to OpenShift and invoke _ flushdb_ REST interface
48
+
49
+ git add --all
50
+ git commit
51
+ git push
52
+
You can’t perform that action at this time.
0 commit comments