Giter Club home page Giter Club logo

pcf-metapod-services's Introduction

gng

Grab-N-Go - a little python tool to download files from Pivotal Network and upload them to one or many Ops Managers.

Setup

Python uses a package manager called pip - you will need this to install everything. Test if you have it by typing pip on a command line. If you don't have it try:

$ sudo easy_install pip

If that doesn't work - go read this. If you have dependency or permission problems your best bet is to use virtualenv (described in that link).

You need to edit conf.toml and enter your Pivotal Network API key:

Get your Pivotal Network API Key by logging into http://network.pivotal.io - it's at the bottom of your profile page.

Edit the conf.toml file and replace the dummy key:

api_key = "AG_u1blahblahblahMHqnF"

Update local product list

The first thing you need to do before downloading / uploading pivotal products is to update a local database of products. We will use the database for the other commands that follow.

$ python gng.py --update

Dump the product list to a text file

Now that your local database is updated you can dump the contents to a file. I should just make this part of the update step. Next release perhaps?

$ python gng.py --dump-list [filename]

Cut and paste the files you want to download

Open the dump you created, and cut / paste the lines that contain the files you want to download. You can name this new file whatever you want. Here's what it might look like:

Riak CS                                   1.5.7.0                     p-riak-cs-1.5.7.0.pivotal
Redis                                     1.5.2                       p-redis-1.5.2.0.pivotal
RabbitMQ                                  1.4.9                       p-rabbitmq-1.4.9.0.pivotal
Elastic Runtime                           1.6.8                       cf-1.6.8.pivotal

Download the files you want

Now you have a list of files to download. Create a download directory and run the download command as follows:

$ mkdir [directory]
$ python gng.py --download [download-list-filename] --path [directory]

Upload all the files to all the Ops Managers

You can upload these files to more than one Ops Manager. Just create a TOML file of your choosing. We'll call ours opsmanager.toml

[[opsmanager]]
url = "54.86.17.2"
username = "admin"
password = "donkeybrain7"
[[opsmanager]]
url = "52.91.206.10"
username = "admin"
password = "monkeyhead8"

The upload command is as follows:

$ python gng.py --upload [ops-manager-list-toml-file] --path [directory]

pcf-metapod-services's People

Contributors

mreider avatar

Watchers

James Cloos avatar David C avatar Saswat Praharaj avatar Neelesh Pateriya avatar  avatar Fabio Giannetti 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.