GithubHelp home page GithubHelp logo

provider-image-checker's Introduction

provider-image-checker

Check images offered by various cloud providers and detect changes.

How to use

Make sure that Libcloud is installed

pip install apache-libcloud

Run imagechecker.py manually or add a cron job to run the script at regular intervals. When the script is run, it will download a list of images as specified in the file config.json. If the script has been run previously, it will then compare the new list to the previous one. If any changes have been detected, those changes will be saved to a timestamped diff file. The following changes are recorded in the diff file together with the image id's:

  • added: The image been added to the provider since last time the script was run.
  • deleted: The image has been deleted.
  • modified: The image id still exists, but the image name has changed.

The diff file will be stored in the directory specified in config.json as diff_directory.

Adding a provider

To add a provider to check for images, edit config.json to add the provider name as it appears in the list at https://libcloud.readthedocs.org/en/latest/apidocs/libcloud.compute.html?highlight=provider#libcloud.compute.providers.Provider.ABIQUO. Under each provider name you must also provide the following fields:

  • api_key: Your api key from the specified provider.
  • client_id: Your client id. Some providers do not use a client id. In that case use an empty string for this field.
  • filters: A list of regular expressions to filter out the desired images.

Additional options

file_directory: Change this field in config.json to specify where the downloaded image list wil be saved. The list is saved in JSON format, in a file named images.json.

provider-image-checker's People

Contributors

jsundmannorberg avatar juhas avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

isabella232

provider-image-checker's Issues

Dynamic help widget

We need to have a dynamic help widget written with angular.js. We would add it to the page and it would show documentation for the current page on the right sidebar. When user changes the page it would change to that pages documentation.

UI Wireframe:
image

Specification:

  • Create a directive or just an ng-view with controller (maybe easier to make it just a view first).
  • Load a documentation html (for example `/docs/main.html) to the sidebar based on current state.
  • You can use ui-router's $onStateChangeSuccess event ($rootScope.$on('$stateChangeSuccess',...)) to detect state.
  • There should be a button to hide/unhide the widget (<-symbol on the wireframe).

You can for example use following mapping to load documentation:

{
  "main": "docs/main.html",
  "page1": "docs/page1.html",
  "page2": "docs/page2.html",
  "page3": "docs/page3.html"
}

User flow:

  • User opens /main page.
  • Right sidebar has docs/main.html as content
  • User changes to page1
  • Right sidebar changes to docs/page1.html
  • User clicks hide-button <
  • Right sidebar disappears

The target is to create dynamic help widget that we can easily add to any angular project without adding much code.

It is recommended (but not required) to use Feathers as project boilerplate (gives you build-process and folder structure).

Requirements for the system

Technologies

  • Python
  • Cron or long-running service
  • libcloud to interact with cloud provider api's. Specifically this method to fetch all images for a provider.

Goal for the system
System will regularly check for most up-to date image-id's for various cloud providers (start with digitalocean) and detect when an image-id has changed.

Detailed requirements:

There will be one python process that will either be run through cron or as long-running daemon (should never crash in this case).

Configuration will be read from json or yaml file. This will include set of cloud providers (digitalocean to start with) and image-names or regex pattern for each provider (We use Ubuntu 14.04 64bit).

Process should fetch the list of images for each provider, find the target-images and compare them to the previous values. Action is then triggered with the result (this action can be to just write it to a file for now).

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.