Installation¶
To learn more about submodules check out the [following link](https://github.blog/2016-02-01-working-with-submodules/)
To clone all repos at once just run:
git clone --recurse-submodules -j8 git@gitlab.com:reactive-pay/rpay-compose.git
Put an .env file for each service folder. It will allow to easily setup ENV variables for each service in further.
Docker install¶
Install docker on your local machine: https://www.docker.com/community-edition#/download
Then start building your services:
docker-compose build
Once it finished we need to setup some basic data. Each service has the same name as project’s folder name, it’s very useful when you enter docker containers.
Setup rpay-business¶
docker-compose run --rm rpay-business bash
rake db:create
rake db:migrate
rake db:seed
rake rpay:setup_db_data
exit
If something went wrong with development data, you can try to clean the database using the following rake task:
It clears all data but does not drop the database, so you can start over rake db:migrate again.
Setup rpay-core¶
docker-compose run --rm rpay-core bash
rake db:create
rake db:migrate
rake db:seed
rake rpay:setup_db_data
rake rpay:add_demo_business_account
exit
And again here, if something went wrong with development data, try again with rake db:clear.
Setup rpay-settings¶
docker-compose run --rm rpay-settings bash
rake db:create
rake db:migrate
rake db:seed
exit
Setup rpay-guard¶
For guard service there is no specific setup procedure.
Get services up and running¶
docker-compose up
Final checks¶
Check that services are reachable for each other. To do that, enter into each container and try to reach other service via RestClient
Warning
you should get services up and running in the first place to be able reaching out multiple services from separate console
Install ReactivePay cluster¶
Requirements:
Subdomain name, ready to attached to the cloud infrastructure
Account to a cloud data hosting services (AWS/AliCloud/VMSphere)
Define “Ansible” settings for network environment setup
Run:
{{ ansible_root }}/\!_stand-recreate.sh {{ ansible_environment }} {{ product_name }} USERNAME PASS {{ NOWAIT }} {{ TYPE_OF_RUN }} {{ cloud_type }}