Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

Vagrant provision no longer updating chef cookbooks #426

Closed
3vcloud opened this issue Nov 23, 2015 · 3 comments
Closed

Vagrant provision no longer updating chef cookbooks #426

3vcloud opened this issue Nov 23, 2015 · 3 comments

Comments

@3vcloud
Copy link

3vcloud commented Nov 23, 2015

Hi,

As mentioned in #385 , a previous commit has removed the SyncedFolders method on provision, which has caused some stress.

We use a forked version of this repo using spot instances for our development to save some money. I have a chef script that uses the current server's IP address to assign an A record in route 53 (because load balancing at $0.028ph is too expensive for our development needs)

ip_address = open('http://169.254.169.254/latest/meta-data/public-ipv4', options = { proxy: false }, &:gets)

unless node['load_balancer'].nil? || node['load_balancer'].empty?
    aws_elastic_lb node['load_balancer'] do
        aws_access_key aws_access_key_id
        aws_secret_access_key aws_secret_access_key
        name node['load_balancer']
        action :register
    end
end

unless node['route_53_domain'].nil? || node['route_53_domain'].empty?
    node['route_53_domain'].each do |domain,subdomain|
        # Create a zone for example.com
        amazon_dns_zone domain do
            aws_access_key_id     aws_access_key_id
            aws_secret_access_key aws_secret_access_key
        end
        amazon_dns_record subdomain do
            domain domain
            value ip_address
            type "A"
            ttl 60
            aws_access_key_id     aws_access_key_id
            aws_secret_access_key aws_secret_access_key
        end
    end
end

This needs to be run on the AWS server to test, but without syncing the changes on provision, and the fact that a spot instance can't be stopped and started again, I'm having to scrap the server every time to test this.

@3vcloud 3vcloud changed the title Vagra Vagrant provision no longer updating chef cookbooks Nov 23, 2015
@rtyler rtyler closed this as completed Nov 23, 2015
@rtyler rtyler reopened this Nov 23, 2015
@3vcloud
Copy link
Author

3vcloud commented Nov 23, 2015

P.S. Sorry for lack of message body, slipped on submission!

@yoshiwaan
Copy link

As you've probably worked out this is a long running issue and actually impacts multiple plug-ins for vagrant, not just AWS.
There's been little movement to get the problem fixed, although it needs to be fixed upstream (something like hashicorp/vagrant#5850).
My suggestion in the meantime (and maybe permanently because it works well) would be to move your test over to Test Kitchen. Test Kitchen + kitchen-ec2 has worked flawless since the last few versions for me.

@3vcloud
Copy link
Author

3vcloud commented Nov 23, 2015

Thanks for the feedback @yoshiwaan . I'm also getting feedback from the team about issues with the AWS machines losing reference to the synced folders altogether - the fix for this normally being to delete synced_folders and re-provision - but would still give a big issue if we had to reload a production server in this scenario.

Either way, definitely looks like a bug with vagrant itself and not this plugin, so I'll close this one off and subscribe to your other issue - thanks again 👍

@3vcloud 3vcloud closed this as completed Nov 23, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants