Skip to content

A buildpack that allows exploring around the Cloud Foundry runtime container. Useful when creating other buildpacks to discover the staging and runtime environment setup / restrictions

License

Notifications You must be signed in to change notification settings

cloudfoundry-community/container-info-buildpack

Repository files navigation

container-info-buildpack

A buildpack that allows exploring around the Cloud Foundry runtime container. Useful when creating other buildpacks to discover the staging and runtime environment setup / restrictions

It use:

  • for web-ui part:
  • AngularJS (for MVVM)
  • Bower (a package manager for the web)
  • Grunt (a javascript task runner)
  • Openresty (Nginx server with lua scripting)
  • for buildpack himself
  • Forego (a foreman port in go, foreman is use to run Procfile)

NB! By default login for the web-ui is admin/admin feel free to change it by placing a .htpasswd at your root app folder. (Prefer use the command htpasswd to create this file)

Using

For a simple test:

Push a new "empty" app

$ mkdir container_info && cd container_info
$ touch container-info
$ cf push container-info-test -m 64M  -b https://github.com/cloudfoundry-community/container-info-buildpack.git

On the webpage default logins are: admin/admin

To test your custom buildpack compile phase:

  1. Create a folder with source test
  2. Create a file or other things which will needs your detect script
  3. Push the app in your cloudfoundry with this buildpack https://github.com/cloudfoundry-community/container-info-buildpack.git
  4. Go to the root with your favorite browser and login with admin/admin
  5. Go to buildpack page
  6. Put your buildpack url (could be a .git url ending or .tgz or .zip)
  7. See if everythings are ok or not

Cloud Foundry Extensions - Offline Mode

The primary purpose of extending the heroku buildpack is to cache system dependencies for firewalled or other non-internet accessible environments. This is called 'offline' mode.

'offline' buildpacks can be used in any environment where you would prefer the dependencies to be cached instead of fetched from the internet.

The list of what is cached is maintained in bin/package.

Using cached system dependencies is accomplished by overriding curl during staging. See bin/compile

Building

  1. Make sure you have fetched submodules
git submodule update --init
  1. Build the buildpack
bin/package [ online | offline ]
  1. Use in Cloud Foundry

    Upload the buildpack to your Cloud Foundry and optionally specify it by name

    cf create-buildpack container-info-offline container-info_buildpack-offline-v.zip 1
    cf push my_app -b container-info-offline

UI

Giving you a web app through which you can "explore" the container environment

Web UI

Rebuild web-ui in the buildpack

If you are contributing on the buildpack and particulary in the web-ui part you will have some trouble. You should know that you must work on web-ui/app not the dist one.

When you finished to work on the web-ui you need to package it to make it go in dist folder to do this you need 3 things:

  • First install node.js
  • Install bower with npm with this command npm install -g bower
  • Install grunt with npm with this command npm install -g grunt

Ok now you have your tools, next step is to go in command line to the folder web-ui. And now do these commands:

$ npm install
$ bower install
$ grunt --force

Your dist folder is ready to be use, you've done.

Contributing

Feel free to fork this project and post issues or/and pull request on the side of this page.

About

A buildpack that allows exploring around the Cloud Foundry runtime container. Useful when creating other buildpacks to discover the staging and runtime environment setup / restrictions

Resources

License

Stars

Watchers

Forks

Packages

No packages published