Giter Site home page Giter Site logo

move_servers's Introduction

move_servers

Description

Project to move all servers from a target server group into a subset of Linux and Windows server groups. The subset of server groups are separated by platforms then by their respective server labels.

The second functionality of this project moves all deactivated servers that are older than 14 days into a targeted retired group.

Prerequisities:

  1. cloudpassage sdk (Can be installed here: https://github.com/cloudpassage/cloudpassage-halo-python-sdk/tree/develop)

  2. Populate the following values in portal.yml (located in configs directory)

  • key_id, secret_key pair (This is your halo portal api_keys)

  • linux_subgroup (group_id for the target linux subgroup)

  • windows_subgroup (group_id for the target windows subgroup)

  • retired_group_id (group_id for the deactivated servers to be moved into)

  • newserver_group (name of the new server group)

Note: group_ids can be retrieved from the halo ui via v1/groups

Dependencies:

  1. Python 2.7.10
  2. cloudpassage python package
  3. pytz (install via pip install pytz)
  4. dateutil.parser (install via pip install python-dateutil)

To use:

python clean.py

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.