Open Shift Express with Identity Cert project
I decided to test out openshift offering by redhat. It runs python via the wsgi framework approach. So I decided to try and deploy the Identity Cert project I'm working on.
After a couple changes in the application startup / library configuration based on PyToaster. I was ready to deploy. (Still need to incorporate the changes back into pytoaster project from identity cert for next projects I do, also some duplicate code cleanup)
Here is some of the steps I ended up having to do:
- In identity cert project, grab a copy: `git archive --format zip --output ~/temp/identitycert.zip master`
- Create project for open shift: `rhc-create-app -a osidentitycert -t wsgi-3.2.1`
- `cd osidentitycert`
- Add files from identity cert repo: `unzip ~/temp/identitycert.zip`
- Resolve depends: `./bin/resolvedepends`
- Add everything: `git add .`
- Commit all: `git commit -m"initial commit"`
- Add to open shift: git push
So now its up at: http://osidentitycert-driedtoast.rhcloud.com/. App still needs a bit of work though. Now I have some motivation to complete it. Some gotchas I had to deal with:
- Pathing of files, used `os.path.dirname(__file__)` to get abs paths
- Debugging of app, have to download app via `rhc-snapshot -a osidentitycert` (which downloads a tar you look into appname/logs)
- Forgot my url for testing it, used `rhc-user-info` to find it
Overall its still a bit clunky of a service, all command line (would be nice to have a little dashboard for quick url viewing) and debugging is a bit annoying.