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

Automate creating overlays #91

Closed
YanChii opened this issue Nov 6, 2017 · 1 comment
Closed

Automate creating overlays #91

YanChii opened this issue Nov 6, 2017 · 1 comment
Assignees
Milestone

Comments

@YanChii
Copy link
Contributor

YanChii commented Nov 6, 2017

This is proposal of a script that will automate overlay creation on compute nodes using ansible.

Script name: /opt/erigones/bin/esdc-overlay

Usage:
esdc-overlay create <overlay_name> <node_list|all> [type]

Example:
esdc-overlay create myoverlay1 all
esdc-overlay create myoverlay1 cn01.local,cn02.local,cn03.local

What it will do:

  • verify parameters
    • overlay name cannot have a trailing number
    • check node names (against ansible's hosts file)
    • supported overlay type (files or direct)
    • verify node config (presence of external IP)
  • execute ansible tasks over all selected nodes
    • add IPSec rules
    • add firewall rules (to allow this overlay connect among selected nodes)
    • add overlay into config file
    • add overlay into /var/run/smartdc/networking/overlay_rules.json (refresh net-virtual)
    • refresh stored node info using DC API (continue if failed)
    • update cfgdb settings

The create command can be run multiple times to ensure the overlay is correctly setup. If the overlay already exists on a node, nothing will happen.

Other commands:
esdc-overlay delete <overlay_name>
esdc-overlay list

The list command prints all overlays with nodes assigned to them.

J.

@YanChii
Copy link
Contributor Author

YanChii commented Dec 10, 2017

Add command:
esdc-overlay update [overlay-rule-name] [node-list]
Checks and updates overlay & IPSec configuration on all involved nodes. Useful when a new node is added. When run without a overlay-rule-name, it updates configuration of all overlays on all nodes.

Overlays configuration is queried from cfgdb:
/esdc/settings/overlays/{{ overlay rule name }}/nodelist (csv or "all")
/esdc/settings/overlays/{{ overlay rule name }}/rule (configuration string)

dn0 pushed a commit that referenced this issue Dec 30, 2017
@dn0 dn0 closed this as completed Jan 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants