Giter Club home page Giter Club logo

openshift-wirecloud's Introduction

OpenShift FIWARE Wirecloud docker image

License badge

Dockerfile description and OpenShift configuration file of the FIWARE Wirecloud enabler in order to create a docker image and deploy a corresponding service instance in an OpenShift environment.

Create the Docker Image

The first steps is to login inside the docker system through the execution of the command:

docker login

In order to create the proper image you need to have installed docker engine. The first command is used to generate the docker image from the defined Dockerfile.

docker build -f Dockerfile -t flopez/wirecloud:1.1 .

It creates the corresponding docker image tagged with flopez/wirecloud. Currently, the only version that was supported and generated is the 1.1. Down versions to 1.1 are on a best-effort basis. The next step is upload the image into a repository (in our case Docker Hub).

docker push flopez/wirecloud:1.1

OpenShift deployment

To start to work with OpenShift, you need to be registered in the corresponding environment. Just execute the following command:

oc login <OpenShift server>

This command will request you the username and password to access to the proper OpenShift environment. Now, to deploy a new application, the first step is the creation of the proper application in the OpenShift environment. Just execute the command:

oc new-app -e POSTGRES_DATABASE=<name of the PostgreSQL database> \
           -e POSTGRES_HOSTNAME=<PostgreSQL hostname> \
           -e POSTGRES_PASSWORD=<PostgreSQL user password> \
           -e POSTGRES_USER=<PostgreSQL username> \
           flopez/wirecloud:1.1 \
           --name wirecloud \
           -o yaml > wirecloud.yaml

Keep in mind that it is needed to specify the postgresql server hostname inside the OpenShift environment in order to know to which DB should be connected the Wirecloud instance. The docker image flopez/wirecloud is deployed publicly in Hub Docker public repository. This operation will create the definition of the new application wirecloud with the corresponding yaml description file. We do not use this created description file but the one that we provided, due to we need to edit the content. You can compare the generated description application with the content inside the config folder to see the differences. Finally, keep in mind that in OpenShift the hostname of the different services follow the next format:

<service name>.<project name>.svc

Furthermore, to deploy our wirecloud application just execute the corresponding command:

oc create -f config/

Last but not least, if we want to delete completely all the resources generated with these configuration files, just execute the corresponding command, specifying the name of the application that was created in the execution of the oc new-app command:

oc delete all -l app=wirecloud

Docker Compose deployment

The docker-compose folder provides you the corresponding docker-compose description file in order to deploy a complete instance of FIWARE Wirecloud using docker-compose. Just execute the command with the proper definition of the postgreSQL DB environment variables:

docker-compose up -d

License

These scripts are licensed under Apache License 2.0.

openshift-wirecloud's People

Contributors

flopezag avatar

Watchers

 avatar  avatar

openshift-wirecloud's Issues

Provide version management

It should be nice if we can offer information about the current version in the important files like Dockerfile and kubernetes configuration files in order to know which version we are using.

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.