? about setting up Pact Broker to run on an aws EC2 instance

514 views
Skip to first unread message

Guy Trudeau

unread,
Oct 28, 2016, 10:07:09 AM10/28/16
to Pact
Hello,
    I'm trying to run Pact Broker on an aws EC2 instance and I wish to use an Aurora DB for the database.  I prefer not to run inside a Docker container as that just adds one more layer of complexity.  Has anyone tried this and is it possible? Here are a few specific questions:

   - How do I connect PB to the database
          - what configuration file do I create/modify to edit the DB connection info
   - Any reason why PB wouldn't wouldn't be stable outside of a Docker container?
   - I'm quite new to ruby.  How do I actually launch PB?

   Guy


Matt Fellows

unread,
Oct 28, 2016, 7:33:18 PM10/28/16
to Pact
It is absolutely possible, although honestly it is easier to just take the docker container as you'll get the scripting that starts the app for free.

Assuming you don't want to use Docker:

1. Provided you have setup network connectivity within your subnet/VPC, you'll need to configure the database details in config.ru as per the docs (https://github.com/bethesque/pact_broker#for-reals)
1.1 see above
2. Nope, it should work just fine - it's just a Rack App (https://rack.github.io/)
3. I would read up on running Rack apps first. You'll need to create and setup a Ruby runtime on your EC2 host, install any dependencies (gem install) and optionally put a reverse proxy in front of it (such as nginx). It is acceptable to run it standalone (e.g. rackup config.ru)

If you take a look at https://github.com/DiUS/pact_broker-docker, you should be able to see how these things are done.

Cheers,
Matt
Reply all
Reply to author
Forward
0 new messages