Coder Social home page Coder Social logo

challenge-devops's Introduction

Accessing a remote service

In this challenge, you will propose a way to deploy and access a service running on a remotely blocked port.

Consider the architecture proposed in the representation below:

alt text

The only allowed connection between Client A and Server A is via SSH. The only allowed connection between Server A and Server B is via SSH.

We need to:

  • Deploy a web service on Server B, running an Ansible script from Client A
  • Then we will access this service from Client A using HTTP

Both client and servers run CentOS 7 without X.

We expect you to:

  • Provide commands that create the test machines, they can be local VMs or instances in any cloud provider.
  • Create an Ansible playbook that deploys the web service and its dependencies (described below). Make sure to create a setup that allows Ansible to run on Client A with Server B as the target host.
  • Provide the set of commands that allow the service to be accessed from Client A, given the network restrictions in this environment.
  • Provide a document, in english, explaining your solution: what each script/command does, their possible outputs, including failures, why you chose them, etc. Don't forget to describe how to make test calls from the client.

The web service

We are going to deploy a Sensor Data service. It is very simple:

  • To save a measurement, the user sends a JSON as POST to [host]:8000/measures. The JSON contains the name of the sensor that did the measurement, the timestamp and the measured value. This application does not consider the unit for each measurement, they are just "values"

Examples

{"sensor": "Motor 1 Temperature", "timestamp":"2019-01-06_09:35:40", "value": 90}
{"sensor": "Motor 1 Temperature", "timestamp":"2019-01-06_09:35:47", "value": 94}
{"sensor": "Motor 1 RPM",         "timestamp":"2019-01-07_09:30:28", "value": 5000}
{"sensor": "Valve XYZ Pressure",  "timestamp":"2019-01-07_10:12:56", "value": 52}
etc
  • After saving some measurements the user can generate a report displaying the average value per minute. To generate the report call [host]:8000/minute-report

Example output:

--------------------------------------------------------------------------------------------
|Sensor                             |Minute           |Num of measures|           Avg value|
--------------------------------------------------------------------------------------------
|Motor 1 RPM                        |2019-01-07 09:30 |              1|               5,000|
|Motor 1 Temperature                |2019-01-06 09:35 |              2|                  92|
|Valve XYZ Pressure                 |2019-01-07 10:12 |              1|                  52|
--------------------------------------------------------------------------------------------

The Java package that implements this service is already provided under the app/release/ directory.

To test it locally you must have Java (recommended version 8) and MongoDB installed. Enter the app/release/ directory and run java -jar [name of the jar file] to start the service. Then Use your preferred HTTP client to make test calls

What is expected in the server deployment:

Your Ansible script must install Java and MongoDB, deploy the application package and configure the application to start as a Service.

Solve this challenge

To solve this challenge, you may fork this repository, then send us a link with your implementation. Alternatively, if you do not want to have this repo on your profile (we totally get it), send us a git patch file with your changes or a zip containing the updated project.

There is no unique solution to this challenge. The intent is to evaluate candidate's ability and familiarity with tools and best practices.

If you are already in the hiring process, you may send it to whoever is your contact at Intelie. If you wish to apply for a job at Intelie, please send your solution to [email protected].

challenge-devops's People

Contributors

hubefonseca avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.