We do not use this, anymore. Replaced by https://github.com/javaBin/submitthethird
This is an application that lets speakers submit talks to JavaZone.
Integrates with Sleepingpill which stores the talks.
- Check out repo:
git clone git@github.com:javaBin/submit.git
- Build backend:
cd backend && mvn clean install
- Build frontend:
cd frontend && npm install
- Build nodeproxy:
cd scripts/proxy && npm install
- Start local postgres:
cd localpostgres && vagrant up
- Run the app:
./scripts/start.sh
This starts a screen. To escape from the screen: ctrl-x
, q
, y
.
Run the class SubmitApplication
. Couldn't be easier ;)
We have created a Postman Collection to make it easy to test all the API calls of Submit when developing.
- Install Postman
- Import the collection
submit.postman_collection.json
- Setup Postman environment with key-value:
baseurl=https://submit.javazone.no
orbaseurl=http://localhost:8080
- Start by running the
POST – Generate token
with your email address. - Then you can do any other call using the token you got in an email in an
X-token
header.
Install aws
and eb
command line tools, as well as ansible
:
brew install awscli
brew install aws-elasticbeanstalk
brew install ansible
Edit/add the file ~/.aws/credentials
and add these lines
[javabin]
aws_access_key_id = <ADD YOURS HERE>
aws_secret_access_key = <ADD YOURS HERE>
cd frontend && ./deploy.sh
(you'll be asked about which bucket to deploy to)cd backend && ./deploy.sh submit-<env>
The deploy needs the ansible vault password to be able to decrypt the property file. Ask around to get it :)
You need the ssh key. Get the private and public key (javabin
and javabin.pub
) from someone who have them already, and place them in ~/.ssh
Then you just do:
eb ssh submit-<env>
- Logs:
cd /var/log && tail -f web*.log nginx/*log
- App files:
cd /var/app/current/
To edit which properties are used for deployment to AWS, edit the files in the config
folder:
ansible-vault edit config/<env>.properties.encrypted
You need the vault password for this. Ask around to get access to it :)
You could probably just use test/prod which exists.
If you need a new, do this and follow the instructions to get an environment up and running
eb create --region eu-central-1 --profile javabin
You need to setup a database + property files for backend + a frontend S3 bucket + load balancer as well. For now, this is a "manual process". Ask around... ;)