Giter Site home page Giter Site logo

michael-chi / ansible-google-cloud Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mateothegreat/ansible-google-cloud

0.0 1.0 0.0 29 KB

Controlling Google Cloud Platform with ansible

Home Page: https://matthewdavis.io

Makefile 37.07% Python 62.93%

ansible-google-cloud's Introduction

Clickity click Twitter Follow Skype Contact

Getting started

Clone this repo and initialize submodules:

git clone https://github.com/mateothegreat/ansible-google-cloud && cd $_
git submodule update --init

Control Google Cloud Platform with ansible by Example

Requirements

pip install ansible
pip install pycrypto
pip install apache-libcloud

Google Compute Engine

Creating Instances

$ ansible-playbook gce-instances-create.yml -e instances=test-01,test-02

PLAY [Create instance(s)] ******************************************************************************************************TASK [Launch instances] ********************************************************************************************************changed: [127.0.0.1]
TASK [Wait for SSH to come up] *************************************************************************************************
ok: [127.0.0.1] => (item={u'status': u'RUNNING', u'network': u'default', u'zone': u'us-central1-a', u'tags': [u'test'], u'image': u'centos-7-v20180314', u'disks': [u'test-01'], u'name': u'test-01', u'public_ip': u'104.197.64.187', u'private_ip': u'10.128.0.7', u'machine_type': u'n1-standard-1', u'subnetwork': u'default', u'metadata': {}})
ok: [127.0.0.1] => (item={u'status': u'RUNNING', u'network': u'default', u'zone': u'us-central1-a', u'tags': [u'test'], u'image': u'centos-7-v20180314', u'disks': [u'test-02'], u'name': u'test-02', u'public_ip': u'35.188.121.115', u'private_ip': u'10.128.0.8', u'machine_type': u'n1-standard-1', u'subnetwork': u'default', u'metadata': {}})

TASK [Add host to groupname] ***************************************************************************************************
changed: [127.0.0.1] => (item={u'status': u'RUNNING', u'network': u'default', u'zone': u'us-central1-a', u'tags': [u'test'], u'image': u'centos-7-v20180314', u'disks': [u'test-01'], u'name': u'test-01', u'public_ip': u'104.197.64.187', u'private_ip': u'10.128.0.7', u'machine_type': u'n1-standard-1', u'subnetwork': u'default', u'metadata': {}})
changed: [127.0.0.1] => (item={u'status': u'RUNNING', u'network': u'default', u'zone': u'us-central1-a', u'tags': [u'test'], u'image': u'centos-7-v20180314', u'disks': [u'test-02'], u'name': u'test-02', u'public_ip': u'35.188.121.115', u'private_ip': u'10.128.0.8', u'machine_type': u'n1-standard-1', u'subnetwork': u'default', u'metadata': {}})

PLAY RECAP *********************************************************************************************************************
127.0.0.1                  : ok=3    changed=2    unreachable=0    failed=0

Deleting Instances

$ ansible-playbook gce-instances-delete.yml -e instances=test-01,test-02

PLAY [Delete instance(s)] *******************************************************************************************************
TASK [Destroy instances] ********************************************************************************************************changed: [127.0.0.1]

PLAY RECAP **********************************************************************************************************************127.0.0.1                  : ok=1    changed=1    unreachable=0    failed=0

ansible-google-cloud's People

Watchers

 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.