A short while ago, we wrote about the vagrant-cloudstack plugin and its compatibility with Exoscale Open Cloud.

Community efforts have since then bumped features in play with 2 new additions:

Ability to specify security groups by name

By replacing the property cloudstack.securitygroupids by the new cloudstack.securitygroupnames you can define an array of names you want your instances to belong to.

However you still need to have defined the security groups and rules prior to lunching your vagrant upcommand.

Ability to create a security group

Therefore the name, description and rules can be created directly from you Vagrantfile. Here is an example from the Pull Request bringing this feature:

[...]
config.vm.provider :cloudstack do |cloudstack, override|
    cloudstack.host = "api.exoscale.ch"
    cloudstack.path = "/compute"
    cloudstack.port = "443"
    cloudstack.scheme = "https"
    cloudstack.keypair = "exoscale"

    cloudstack.api_key = "your_api_key"
    cloudstack.secret_key = "your_secret_key"


    cloudstack.template_id = "a17b40d6-83e4-4f2a-9ef0-dce6af575789" #Ubuntu 12.04
    cloudstack.service_offering_id = "71004023-bb72-4a97-b1e9-bc66dfce9470" # Micro instance with 10GB disk
    cloudstack.zone_id = "1128bd56-b4d9-4ac6-a7b9-c715b187ce11" #GV2
    cloudstack.network_type = "Basic"
    cloudstack.security_groups = [
      { 
        :name         => "common", 
        :description  => "created in the Vagrantfile", 
        :rules        => [
          {:type => "ingress", :protocol => "TCP", :startport => 22, :endport => 22, :cidrlist => "0.0.0.0/0"}, 
          {:type => "egress",  :protocol => "TCP", :startport => 23, :endport => 23, :cidrlist => "0.0.0.0/0"}
        ]
      }, 
      { :name         => "test",
        :description  => "Also created in Vagrantfile",
        :rules        => [
          {:type => "ingress", :protocol => "TCP", :startport => 80, :endport => 80, :cidrlist => "0.0.0.0/0"}, 
          {:type => "ingress", :protocol => "TCP", :startport => 443, :endport => 443, :cidrlist => "0.0.0.0/0"}, 
          {:type => "egress", :protocol => "TCP", :startport => 8080, :endport => 8080, :cidrlist => "0.0.0.0/0"}
        ]
      }
    ]
  end

[...]

This makes it a nice and easier alternative for quick multi machines setups.

Thank you to community member @nicolasbrechet for publishing those patches.