2

I'm trying really hard to get salt-cloud to provision new servers with one (or more) private networks attached.

SaltStack's documentation here said that I am supposed to add this "section" to the 'providers' configuration file:

networks:
  - fixed:
    # This is the private network
    - private-network-id
    # This is Rackspace's "PublicNet"
    - 00000000-0000-0000-0000-000000000000
    # This is Rackspace's "ServiceNet"
    - 11111111-1111-1111-1111-111111111111

So I did that (replacing private-network-id with the Private Network's UUID, of course).

Didn't work.

I tried adding the section to the 'profiles' configuration file.

Also didn't work.

I tried removing the -fixed: atom (hence promoting the list underneath).

Still didn't work.

I'm at the end of my wits here. Can someone please tell me how I can provision a server using salt-cloud and at the same time attach private networks (in addition to PublicNet and ServiceNet) to the instance?

Or is that simply not possible?

pepoluan
  • 5,038
  • 4
  • 47
  • 72

1 Answers1

2

I just tested this. Here's my working provider config

cat /etc/salt/cloud.providers.d/rackspace.conf

rs:
  minion:
    master: <master ip or url>

  # Configure Rackspace using the OpenStack plugin
  #
  identity_url: 'https://identity.api.rackspacecloud.com/v2.0/tokens'
  compute_name: cloudServersOpenStack
  protocol: ipv4

  # Set the compute region:
  #
  compute_region: DFW

  # Configure Rackspace authentication credentials
  #
  user: <user name>
  tenant: <tenant>
  apikey: <api key>

  driver: openstack
  networks:
    - fixed:
      # This is the private network
      - < private network UUID >
      # This is Rackspace's "PublicNet"
      - 00000000-0000-0000-0000-000000000000
      # This is Rackspace's "ServiceNet"
      - 11111111-1111-1111-1111-111111111111
Utah_Dave
  • 532
  • 2
  • 6
  • Thanks! It works! I found out that the key difference is **`driver: openstack`** instead of **`driver: rackspace`**. With the latter, Private Networks won't be attached. The fault is mine, I overlooked that one line in [the documentation](https://docs.saltstack.com/en/latest/topics/cloud/rackspace.html): "The settings that follow are for using Rackspace with the openstack driver". Again, thank you for taking the time to answer!! – pepoluan Oct 13 '16 at 03:51