-
Notifications
You must be signed in to change notification settings - Fork 1
- How do I make sure I am running the latest version of the plugin?
- Why can't I log into the admin console when running on Heroku?
- On Windows, everytime I use CTRL-C to stop my local server it says "Terminate batch job (Y/N)?". Is there a way to stop this?
- If I try to do "foreman start" on a project I created with a different user account it fails. What gives?
- How do I do customizations like adding my own .jar files?
- I don't want all this fancy stuff. I want OpenBD to work exactly like I'm used to. Can I do that?
- I have an existing OpenBD project using ReadyToRun or OpenBD Desktop. Can I deploy it as is?
- I don't want to use the plugin at all. How do I use this buildpack directly?
- The commands are kinda long... Is there a way to shorten them so I don't have to type as much?
- It doesn't work! What do I do?
###How do I make sure I am running the latest version of the plugin?
$ heroku plugins:update openbd-heroku
###Why can't I log into the admin console when running on Heroku?
Short Answer: Run heroku config
and use the value of the OPENBD_PASSWORD
to log into your console.
Long Answer: Nowadays many projects end up being stored in github and sites like it for all the world to see. Passwords in configuration files are becoming a serious security issue. To help alleviate this (a bit), this buildpack uses a heroku config variable to set the admin console password instead of relying on the value stored in bluedragon.xml. When you run heroku openbd:heroku
, if you do not use the --password
option a strong password is automatically generated for you. This is the password that gets used on Heroku regardless of what is set in your bluedragon.xml file. If you want to change this password, do this from your project folder and redeploy:
$ heroku config:set OPENBD_PASSWORD=<password>
Because of this, it is perfectly ok to just leave the default password as "admin" in all of your projects. When running locally the password you set in bluedragon.xml is used, when running on heroku the value of OPENBD_PASSWORD
is used.
###On Windows, everytime I use CTRL-C to stop my local server it says Terminate batch job (Y/N)?
. Is there a way to stop this?
For the long answer see this. Short answer is to just hit CTRL-C twice.
###If I try to do foreman start
on a project I created with a different user account it fails. What gives?
Foreman occasionally has issues on Windows reading environment variables and expanding them in your Procfile. To work around this, the plugin sets $HOME
inside of your-project/.env
to whatever the value was for the user who ran it originally. Just edit .env
and set HOME to your current account's home directory and you should be good to go. You also have to make sure that the Heroku Toolbelt and the plugin are installed for your current user account as well.
###How do I do customizations like adding my own .jar files?
Put them in /WEB-INF/lib
just as you normally would. Your customizations will be tracked in git and deployed to Heroku when you do pushes. The only exception is if you want to actually customize .jars that already exist as part of OpenBD - in this case you are probably better off doing full engine deployments (see next question).
###I don't want all this fancy stuff. I want OpenBD to work exactly like I'm used to. Can I do that?
No problem. When you issue your openbd:generate command, just add --full-engine
as an option. This will give you a completely vanilla installation, jars in /WEB-INF/lib
, all the extra stuff like the manual, etc. You will not be able to use openbd:update to switch versions though - you'll have to manage upgrades yourself. Also, when you do deployments the buildpack will use your files as is - it will not try to download and provision OpenBD for you. You can use the generated Procfile to run your app, or if you prefer you can use OpenBD Desktop to run it using it's built in copy of Jetty.
###I have an existing OpenBD project using ReadyToRun or OpenBD Desktop. Can I deploy it as is?
Generally yes. All you should have to do is put your context root into git and skip straight to openbd:create. The only catch is instead of Jetty the buildpack uses Winstone to run your project on Heroku (primarily to save slug space since Winstone is so much smaller). You may find that you have issues getting things to work. A quick way to fix it is to copy the web.xml file from this repo. It is already modified to work well with Winstone. It is setup by default to use urlrewrite for SEF urls, but you can revert that to the default SEF filter if you like.
###I don't want to use the plugin at all. How do I use this buildpack directly?
$ heroku create your-app-name --stack cedar --buildpack http://github.com/heathprovost/openbd-heroku.git
$ heroku config:set OPENBD_PASSWORD=[password] --app your-app-name
$ heroku labs:enable user-env-compile --app your-app-name
This last bit is necessary because the buildpack needs to read your heroku config variables.
###The commands are kinda long... Is there a way to shorten them so I don't have to type as much?
You can setup some aliases in your shell. If you just want to keep it simple and want to eliminate having to type heroku
in front of every command, you can use the cut-and-paste scripts below. Feel free to modify to your own preferences.
OSX (at least recent versions) uses ~/.bash_profile for this stuff, so use this:
printf "alias openbd='heroku openbd --help'\nalias openbd:generate='heroku openbd:generate'\nalias openbd:update='heroku openbd:update'\nalias openbd:info='heroku openbd:info'\nalias openbd:heroku='heroku openbd:heroku'" >> ~/.bash_profile
For Linux, you generally use ~/.bashrc, so use this:
printf "alias openbd='heroku openbd --help'\nalias openbd:generate='heroku openbd:generate'\nalias openbd:update='heroku openbd:update'\nalias openbd:info='heroku openbd:info'\nalias openbd:heroku='heroku openbd:heroku'" >> ~/.bashrc
Just cut and paste that into your terminal and hit return. On the next shell restart you can just leave off heroku
at the beginning of your commands.
Sorry, but I don't know a way to do this on Windows short of writing batch files.
###It doesn't work! What do I do?
Post an issue. I'll do what I can to help.