Before, we used a CLI that provided the actions below. For AweSim on Open OnDemand we no longer provide a CLI. Here is a table showing the commands and what to do in its place.
cli cmd | purpose | replacement |
---|---|---|
awesim setup | create and modify a bunch of deployment related files, then run update command | for existing apps, manually add and version .env.production and bin/setup-production files (see below) |
awesim update | rebuild assets and call restart and lint | use dashboard web ui or run shell script (~wiag/bin/update-app ) to do 3 steps: install gems, rebuild assets, and restart app |
awesim restart | touch a file that passenger is configured to recognize as a restart file | dashboard web ui or run touch tmp/restart.txt or scl enable git19 rh-ruby22 -- bin/rake ood_appkit:restart
|
awesim lint | access app details in dashboard to see lint errors | |
awesim permission | access app details in dashboard to change FACLs OR use nfs4_setfacl and nfs4_getfacl on the app directory |
|
awesim maintenance on/off | not available - if you think this feature is important for app developers, please let us know |
Setup
- Clone an existing app to
~/awesim/share/<appdir>
(via terminal or dashboard web ui) - Create and version a
.env.production
(follow pattern in Rails Application Template or this file: https://github.com/AweSim-OSC/containerfillsim/blob/22e3cbd2163ee2cf0f11266020a461d602eb3320/.env.production) - replace the secret with a unique string generated via the rake task (bin/rake secret)
- Copy https://github.com/AweSim-OSC/rails-application-template/blob/8513c9b6ba9216fc7fe495d144d5162b996109eb/assets/setup-production to
bin/setup-production
and chmod 755 the file - Run the update commands below
- TODO: does the web ui guide you through this process?
Update
Run after changing shared app.
You can do this through the web interface:
- TODO
Or you can do this via the command line by running this bash script:
-
~wiag/bin/update-app
efranz@webtest04:~$ cat ~wiag/bin/update-app #!/bin/bash
run this script in the root of an app after pulling the latest code
grep RAILS_RELATIVE_URL_ROOT .env.production || { echo "RAILS_RELATIVE_URL_ROOT is not set in .env.production"; exit 1; }
scl enable git19 rh-ruby22 nodejs010 -- bin/bundle install --path=vendor/bundle scl enable git19 rh-ruby22 nodejs010 -- bin/rake assets:clobber RAILS_ENV=production scl enable git19 rh-ruby22 nodejs010 -- bin/rake assets:precompile RAILS_ENV=production scl enable git19 rh-ruby22 nodejs010 -- bin/rake ood_appkit:restart