Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Ansible module for cloudbridge #311

Open
17 tasks
nuwang opened this issue Sep 12, 2022 · 0 comments
Open
17 tasks

Create Ansible module for cloudbridge #311

nuwang opened this issue Sep 12, 2022 · 0 comments

Comments

@nuwang
Copy link
Contributor

nuwang commented Sep 12, 2022

An ansible module for cloudbridge would be of great use to anyone who needs to provision VMs and other cloud resources using simple yaml templates. The template will express the desired state of the resource.

A cloudbridge ansible module for creating a VM could look like the following:

- name: launch a cloudbridge instance
  cloudbridge_instance:
    state: present
    provider:
      type: aws
      aws_access_key_id: 
      aws_secret_access_key: 
    label: vm1
    image: ami-6e649707
    vm_type: m1.small
    key_pair: my_key_pair
    vm_firewalls: []
    user_data: ""        

Similarly, for creating a keypair:

- name: create a new key_pair
  cloudbridge_key_pair:
    state: present
    provider:
      type: gcp
    name: my_new_key_pair

Or a disk:

- name: create a new volume
  cloudbridge_volume:
    state: present
    provider:
      type: azure
   label: my_volume
   size: 10
   description: my postgres volume

Each module would need to inspect the current state of the object, and drive it towards the desired state. For example, if the vm instance does not exist, it would create it. However, if the vm instance exists but only the label has changed, it would rename it.

It would be best to take a phased approach and implement services incrementally so that multiple people can work on it. The ansible modules could be split as follows:

  • Add keypair module
  • Add vm_firewall module
  • Add vm_firewall_rule module
  • Add networks module
  • Add subnet module
  • Add internet_gateway module
  • Add floating_ip module
  • Add router module
  • Add volume module
  • Add snapshot module
  • Add bucket module
  • Add bucket_object module
  • Add image module
  • Add vm_type module
  • Add instance module
  • Add dns host_zones module
  • Add dns record module
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant