Small Sinatra application that returns information about cats available in the store.
The application is a combination of plain text and JSON endpoints. Currently available endpoints
/
- hello page/kittens/info
- Read count of kittens in database and presents info in readable text
Our company developed and released MVP of this application. We envision a great potential for the app and would like to keep building it in a fast and reliable way.
In order to achieve stable and productive development, we rely on automated tests. However, not all changes can be tested automatically so we would like to have a way to test merged code manually before it is pushed to production.
Help us build an automated pipeline for any new code merge/commit that:
- Build application artifact by writing dockerfile(s) and store the image in container registry (e.g DockerHub)
- Using docker image, speenup temporary environment and run automated tests on merged code
- Deploy code to temporary server for manual testing
As you work on your solution you will inevitably have questions - please send all inquiries via Slack. We are happy to assist and help
There are no limitations to using some particular technology or tools. However, it would be nice to see how you can use AWS and Terraform to solve the task.
We would like to see a solution that has following traits:
- Automation - who likes to perform manual steps?
- Configuration - how can we adopt a similar solution for other products/flows/technologies?
- Code - infrastructure/provision/pipelines as a code works the best to: be readable for all engineers, maintain a truth and avoid any hidden manual configurations.
Need ruby 2.4.9
bundle install
- install dependency- Configure database in
config/database.yml
or pass configuraton viaDATABASE_URL
(see section below) bundle exec rake db:create
- create db and run migrationsbundle exec rake db:migrate
- migrate db to latest versionbundle exec rake db:seed
- seed database with basic data
bundle exec rspec
bundle exec rackup --port 1234 --host 0.0.0.0
- Launch web application on port1234
DATABASE_URL
- url to database e.gpostgres://{user}:{password}@{hostname}:{port}/{database-name}
RACK_ENV
- environment for the app. possible values:production
,development
,test