GithubHelp home page GithubHelp logo

9fellas's Introduction

9fellas

A simple 12 Factor-based demo application written in Python that visualizes the number of instances currently running with cute animal icons. Application instances register themselves in a shared Redis datastore.

Commands

  • Add threads by using the /addthread endpoint
  • Delete threads using /deletethread endpoint
  • Applications are hardcoded to send their data to a public application URL, which defaults to 9fellas.cfapps.io and should be changed by setting the all-apps environment variable

Running 9fellas On Pivotal Web Services

Looking to run 9fellas on Cloud Foundry? Here’s some sample instructions for deploying 9fellas onto the hosted Pivotal Web Services cloud:

  1. Make sure you have Git installed, available from https://git-scm.com/
    1. Login to your Cloud Foundry cloud. You can sign up for a free trial from http://run.pivotal.io. Once you’re signed up, login to your Pivotal Web Services cloud with
cf login -a api.run.pivotal.io
  1. Make sure your have the Cloud Foundry CF CLI installed, available from http://docs.run.pivotal.io/devguide/installcf/install-go-cli.html
  2. Clone the 9fellas application into a local directory with
git clone https://github.com/mreider/9fellas.git
  1. Deploy the application to create the application route, but don’t start it until you’ve attached the required Redis service. Choose a unique application name and replace “my-app-name” with that name where it appears. Push the application without starting it using
cf push my-app-name --no-start
  1. Create a shared Redis datastore. PWS offers a free tier 30mb plan that you can provision with
cf create-service rediscloud 30mb my-app-name
  1. Bind the Redis instance to your 9fellas app with
cf bind-service my-app-name rediscloud
  1. The 9fellas app instances report to a URL using the all-apps environment variable. Set the reporting URL endpoint using
cf set-env my-app-name “all-apps” "my-app-name.cfapps.io" 
  1. Restage and start the application with
cf push my-app-name  	
  ```
10. Scale the app up to 6 instances to see more animal icons appear using<br>

cf scale my-app-name -i 6



Afterwards, tear down your app with:

cf delete my-app-name cf delete-service rediscloud cf apps # check no apps are found

9fellas's People

Contributors

mreider avatar

Watchers

James Cloos avatar Eric De Witte 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.