Skip to content

Commit cdac3de

Browse files
committed
Simplify things
1 parent ea7cdb3 commit cdac3de

File tree

1 file changed

+61
-29
lines changed

1 file changed

+61
-29
lines changed

README.md

Lines changed: 61 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,61 @@
1-
This is an OpenShift DIY cartridge that sets up news.arc on a diy app.
2-
3-
Follow these instructions to install it, based on RayRacine's code at github.com/RayRacine/rackos
4-
5-
1. Create an account on OpenShift.
6-
1. Use their console to create an application, say named "test".
7-
* The console shows you that you have a git repo, and a URL for your app.
8-
* e.g., git clone ssh://\<long number here>@test-\<namespace>.rhcloud.com/~/git/test.git/
9-
* and http://test-\<namespace>.rhcloud.com
10-
1. Clone your OpenShift repo on your laptop or whatever in say /code
11-
* cd /code
12-
* git clone ssh://\<long number here>@test-\<namespace>.rhcloud.com/~/git/test.git/
13-
* cd /code/test
14-
* Now in your locally cloned repo.
15-
1. Add my repository with the scripts.
16-
* git remote add rackos git://github.com/shader/arc-openshift.git
17-
1. Fetch it down and merge it.
18-
* git fetch arc-openshift
19-
* git merge --ff arc-openshift/master
20-
1. There is a hidden directory .openshift/action_hooks.
21-
* If you read the OpenShift docs or the README for this project you'll see that basically that these hooks scripts are what drives OpenShift's DIY cartridge.
22-
* A key script is the pre_build which is called when a push to your remote OpenShift repo occurs.
23-
* pre_build checks to see if local copies of Racket and anarki are installed. If not they will be download and installed in the data directory. The post-deploy hook then starts the news.arc server.
24-
1. That's it. Test it by hitting it in your browser. Here is mine http://test-shader.rhcloud.com
25-
1. Further reading of the OpenShift doc explains how to use your personal domain in lieu of the rhcloud.com domain.
26-
27-
## Next Steps.
28-
29-
Edit your code locally. Test run it locally or don't. When ready, commit and push it OpenShift and the scripts will automatically stop/start the server with the new changes.
1+
An OpenShift DIY cartridge that sets up news.arc on a diy app.
2+
3+
Quickstart
4+
-
5+
1. Create an account on [OpenShift](https://www.openshift.com/app/account/new) and install [the OpenShift Client Tools](https://developers.openshift.com/en/managing-client-tools.html).
6+
7+
2. ` rhc app-create arc diy-0.1 --from-code https://github.com/shader/arc-openshift `
8+
9+
Usage
10+
-
11+
12+
1. Create an account and Add your account to admins.
13+
14+
```
15+
rhc ssh arc
16+
echo $your-username > app-root/repo/www/admins
17+
```
18+
19+
2. Customize
20+
21+
```
22+
vi app-root/data/arc/lib/news.arc
23+
```
24+
25+
Or allow users open news in new tap. Just add one line:
26+
```
27+
(mac npage (title . body)
28+
`(tag html
29+
(tag head
30+
(gen-css-url)
31+
(prn "<link rel=\"shortcut icon\" href=\"" favicon-url* "\">")
32+
(prn "<meta name=\"viewport\" content=\"width=device-width\">")
33+
(prn "<base target=\"_blank\">") ;; <--- add this line
34+
(tag script (pr votejs*))
35+
(tag title (pr ,title)))
36+
(tag body
37+
(center
38+
(tag (table border 0 cellpadding 0 cellspacing 0 width "85%"
39+
bgcolor sand)
40+
,@body)))))
41+
```
42+
43+
3. Restart the server.
44+
45+
```
46+
rhc app-force-stop arc && rhc app-start arc
47+
```
48+
49+
Bugs
50+
-
51+
Please Submit [issues](https://github.com/shader/arc-openshift/issues/new).
52+
53+
Thanks to
54+
-
55+
[RayRacine](http://github.com/RayRacine/rackos)
56+
57+
58+
59+
60+
61+

0 commit comments

Comments
 (0)