Giter Club home page Giter Club logo

assessment-todo's Introduction

Todo

Deploy "Todo" app provided by Docker to one virtual machine (CentOS Linux 7) with Ansible.

I used two virtual machines , the main one is a Kali linux machine where I made the deployment of application into the CentOS machine.

Here, I used two diffrent files : iventory and playbook.

The iventory file where I stored the IP_Addr of the host(192.168.50.141) , the port(22 for ssh) and credentials for a successful login. The ansible playbook file is getting-started_deploy.yaml where I had to put the task of copying all the files from the local path location to the remote server so I done the deploy.

For the task to be accomplished I used a single command : "$ ansible-playbook -i inventory getting-started_deploy.yaml" where I specified the inventory for remote connection within parameter '-i inventory' and the plays with the playbook file 'getting-started_deploy.yaml'.

After the command succesfully ran the screen should look like this: returned playbook state

On the remote server, the file appeared at the path specified in playbook which is /home , cd(change directory) into the /home/getting-started/app where I built the app with "# docker built -t getting-started . " and then I ran the app with "# docker run -dp 3000:3000 getting-started". The application works as expected, but I need to add a database(because I don't want the changes to be removed when the container is restarted) into it so I have to add a volume with "# docker volume create todo-db" I delete the old docker container with "# docker rm -f" and then I ran again the app but with the specified db volume "# docker run -dp 3000:3000 -v todo-db:/etc/todos getting-started".

For the application to be seen check the following link: https://ec1933bf4045ea.lhr.domains

Legend:

  • '$' sign is used on kali machine as normal user(kali)
  • '#' sign is used on remote machine(CentOS) as root user
  • /etc/todos is path location where SQLite stores its data in container's filesystem

assessment-todo's People

Contributors

seresadrian avatar

Watchers

 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.