chrisroberts / vagabond

Advocating idleness and work-shyness
Other
233 stars 25 forks source link

No way to set the IP address of the local chef server container #20

Open jaypipes opened 11 years ago

jaypipes commented 11 years ago

I tried setting the :ipaddress of the local chef server in my Vagabondfile:


{
    :nodes => {
        :ops => {
            :template => "ubuntu_1204",
            :ipaddress => "10.0.3.10",
            :run_list => [
                "role[os-ops-database]"
            ]
        }
    },
    :clusters => {
        :simple => [
            "ops"
        ]
    },
   :local_chef_server => {
       :zero => false,
       :berkshelf => true,
       :librarian => false,
       :enabled => true,
       :auto_upload => true,
       :ipaddress => "10.0.3.2"
   },
   :sudo => true
}

Unfortunately, when I rebuilt the server, it attached to a different IP address:

jpipes@uberbox:~/repos/stackforge/openstack-chef-repo$ bundle exec vagabond server rebuild
Vagabond: Rebuilding server
Vagabond: Destroying node: server
Waiting for graceful shutdown and cleanup...
  -> DESTROYED
ERROR: Node not created: server
  -> DESTROYED!
Ensuring expected system state (creating required base containers)
   - This can take a while on first run or new templates...
  -> COMPLETE!
  -> REBUILT!
jpipes@uberbox:~/repos/stackforge/openstack-chef-repo$ bundle exec vagabond server up
Vagabond: Creating server
  -> Chef Server container created!
  -> Chef Server CREATED!
  -> Bootstrapping erchef...
Auto uploading all assets to local Chef server...
Local chef server: Uploading roles
  -> UPLOADED ROLES
Local chef server: Uploading data bags
  -> UPLOADED DATA BAGS
Local chef server: Uploading environments
  -> UPLOADED ENVIRONMENTS
Local chef server: Uploading cookbooks
Cookbooks being uploaded via berks
  -> UPLOADED COOKBOOKS
  -> All assets uploaded!
  -> CREATED!
  -> Bootstrapping erchef...
jpipes@uberbox:~/repos/stackforge/openstack-chef-repo$ bundle exec vagabond status
Name    State    PID    IP        
ops     running  10316  10.0.3.10 
server  running  17814  10.0.3.132

Is there a hidden way to set the local Chef server's container to a static IP address like the other nodes?

Thanks! -jay

chrisroberts commented 11 years ago

Currently the Vagabondfile does not provide the support for setting a static ip address for the server nodes, however adding in support for it should be easy enough. On a side note, what is your use case for a static address on the server node? I have not run into the need yet, which is the only reason why it's not supported. Your use case around this need will probably highlight some assumptions I have been making towards usage, which I would be happy to see and try to prevent.

Thanks!

jaypipes commented 11 years ago

Oh, my thoughts on this were two-fold:

1) Since I'm using static IP addressing in the other nodes, I wanted to use it for the local chef server both for consistency and to ensure that I don't set a node's static IP address to an IP address that the local chef server could possibly receive during bootstrapping

2) The issue I filed about the http_proxy thing... I wanted to be able to set the http_proxy to the Chef server node to experiment with a couple fixes on the other nodes. So, just scratching an itch :)

Best, -jay