Giter Club home page Giter Club logo

vm-fcrepo's Introduction

Playing with vagrant, docker and ansible

Basic concept

We are cloning and building fedora4 on the host(-vagrant-)vm, then we deploy the necessary bits to a docker container. This approach can nicely be integrated with other containers and the container itself stays as lightweight as possible.

Start the vagrant vm

The fedora war has to be put into .provision/fedora4

$ vagrant up
$ vagrant ssh

Set up the host environment

(1) First we install java and maven on the host machine $ ansible-playbook -i /vagrant/ansible/inventory /vagrant/ansible/prepare_host_build_env.yml --connection=local (2) Then we clone the fedora4 repository and build it with maven $ ansible-playbook -i /vagrant/ansible/inventory /vagrant/ansible/get_and_build_fedora4.yml --connection=local TODO: have set maven to skip tests, think it's AGAIN a proxy issue (fails in HTTP API module), this has to be changed on a non-proxy environment)

Build the docker container

$ ansible-playbook -i /vagrant/ansible/inventory /vagrant/ansible/deploy_fcrepo4.yml --connection=local

Run the container

To have a look at whether the docker image was created sucessfully:

$ docker images
REPOSITORY          TAG             IMAGE ID            CREATED             VIRTUAL SIZE
fedora4             version-x       e2b12b2081bb        6 minutes ago       732.1 MB

Run it with the proccess we want to start:

$ docker run -d --net=host fedora4:version-x /usr/local/bin/run_fcrepo

Work with the container

To do sth with the the running container it's good to find out its name

$ docker ps -l
ONTAINER ID        IMAGE                COMMAND                CREATED             STATUS              PORTS               NAMES
b29a2880cf80        fedora4:version-x   "/usr/local/bin/run_   17 seconds ago      Up 15 seconds                           berserk_engelbart

Now you can follow the jetty logs (same effect as tail -f) like this:

$ docker logs -f berserk_engelbart

Use the web interface

Once the jetty server has started up, you can access it from within a browser of your outermost host environment at localhost:8080

vm-fcrepo's People

Watchers

 avatar  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.