GithubHelp home page GithubHelp logo

eviaas's Introduction

eviaas

environment variables injector as a service

About

This service allows easily exposing external services to tsuru applications. It works simply by injecting some predefined environment variables in the application after binding.

Example

Let's assume you have an external logging service running at udp://my.log.service:9976 and you want to expose this value to applications without hardcoding it in them.

First you will have to create the eviaas service application and add it to tsuru:

$ git clone https://github.com/tsuru/eviaas.git

$ cd eviaas

$ tsuru app-create my-log-service-api python

$ tsuru env-set -a my-log-service-api EVI_ENVIRONS='{"MYLOG_PROTOCOL": "udp", "MYLOG_ADDRESS": "my.log.service:9976"}'

$ git push [email protected]:my-log-service-api.git master

$ cat >service_descriptor.yaml <<EOF
> id: my-log-service
> password: 1234
> endpoint:
>   production: http://my-log-service-api.192.168.50.4.nip.io
> EOF

$ crane create service_descriptor.yaml

Now your tsuru has a new service called my-log-service and you can create instances and bind apps to it:

$ tsuru service-add my-log-service my-log-instance

$ tsuru service-list
+----------------+-----------------+
| Services       | Instances       |
+----------------+-----------------+
| my-log-service | my-log-instance |
+----------------+-----------------+

$ tsuru service-bind my-log-instance -a my-app
Instance "my-log-instance" is now bound to the app "my-app".

The following environment variables are now available for use in your app:

- MYLOG_PROTOCOL
- MYLOG_ADDRESS

eviaas's People

Contributors

andrewsmedina avatar cezarsa avatar fsouza avatar

Watchers

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