Tag Example¶
Goals¶
Create a tag for an IP address
Add a parent tag for the IP tag
Reference the parent tag in a resource’s permit list
Add a new tag to the parent tag
See that the resource’s permit list has been updated accordingly
Installation¶
$ git clone https://github.com/paraglider-project/paraglider
$ cd paraglider
$ make build install
Controller Setup¶
$ glided startup <path_to_config>
You can find example configuration files in the tools/examples/controller-configs
directory.
Note
This example will create a VM in GCP. You can create the VM in whichever cloud you prefer. Make sure that your chosen cloud provider is configured in the controller configuration file.
Steps¶
Create a tag for an IP address with name iptag
$ glide tag set iptag --ip 1.1.1.1
Assign iptag to a parent tag named parenttag
$ glide tag set parenttag --children iptag
Resolve the parent tag down to list of names
$ glide tag get parenttag --resolve
Create a resource name vm1
$ glide resource create gcp vm1 <path_to_config>
Note
You can find example configuration files in the
tools/examples/vm-configs
directory.
Add a rule referencing the parent tag to a resource
$ glide rule add gcp vm1 --ping parenttag
Create a tag, iptag2
$ glide tag set iptag2 --ip 2.2.2.2
Add iptag2 to parenttag
$ glide tag set parenttag --children iptag2
Get the permit list of the resource we added to
$ glide rule get gcp vm1
Resolve the parent tag
$ glide tag get parenttag --resolve