GithubHelp home page GithubHelp logo

pixelcog / opsworks-vm Goto Github PK

View Code? Open in Web Editor NEW
60.0 60.0 22.0 37 KB

Virtual machine templates for AWS OpsWorks running on Ubuntu 12.04 and 14.04

License: MIT License

Ruby 56.08% Shell 43.92%

opsworks-vm's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

opsworks-vm's Issues

File mount is failing

Vagrant up is failing.

==> app: Mounting shared folders...
    app: /vagrant => /Users/kurt/workspace/monsieur/bouncer
Failed to mount folders in Linux guest. This is usually because
the "vboxsf" file system is not available. Please verify that
the guest additions are properly installed in the guest and
can work properly. The command attempted was:

mount -t vboxsf -o uid=`id -u vagrant`,gid=`getent group vagrant | cut -d: -f3` vagrant /vagrant
mount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g vagrant` vagrant /vagrant

The error output from the last command was:

/sbin/mount.vboxsf: mounting failed with the error: No such device

Vagrant File

Random "File size test failed" errors during "rake build"

So I've updated the OPSWORKS_AGENT_VERSION to be the latest stable (though I'm not sure if that's relevant) and I get intermittent errors during the agent install that fail the build.

What's frustrating is that sometimes this works and sometimes it doesn't. The error is probably being thrown from aws-managed code, but it's odd that it has intermittent failures in this environment.

Thoughts?

    virtualbox-iso: ~/opsworks-installer.MnwVBv8H ~
    virtualbox-iso: Installing OpsWorks agent version 3433-20160227053027
    virtualbox-iso: 2016-03-18 13:40:46 URL:https://opsworks-instance-agent.s3.amazonaws.com/3433-20160227053027/opsworks-agent-installer.tgz [6627691/6627691] -> "opsworks-agent-installer.tgz" [1]
    virtualbox-iso: Using opsworks-instance-assets.s3.amazonaws.com for assets.
    virtualbox-iso: Downloading agent ruby package
    virtualbox-iso: [Fri, 18 Mar 2016 13:40:46 +0000] downloader: Successfully created temporary download directory. (/tmp/opsworks-downloader.qYcgHojc)
    virtualbox-iso: [Fri, 18 Mar 2016 13:42:46 +0000] downloader: [ERROR] File size test failed. HTTP/1.1 200 OK url: https://opsworks-instance-assets.s3.amazonaws.com/packages/ubuntu/14.04/opsworks-agent-ruby_2.0.0-p645-1_amd64.deb
    virtualbox-iso: [Fri, 18 Mar 2016 13:42:46 +0000] downloader: Retrying download after 0 seconds
    virtualbox-iso: [Fri, 18 Mar 2016 13:42:46 +0000] downloader: Deleting content of directory /tmp/opsworks-downloader.qYcgHojc
    virtualbox-iso: [Fri, 18 Mar 2016 13:44:47 +0000] downloader: [ERROR] File size test failed. HTTP/1.1 200 OK url: https://opsworks-instance-assets.s3.amazonaws.com/packages/ubuntu/14.04/opsworks-agent-ruby_2.0.0-p645-1_amd64.deb
    virtualbox-iso: [Fri, 18 Mar 2016 13:44:47 +0000] downloader: Retrying download after 5 seconds
    virtualbox-iso: [Fri, 18 Mar 2016 13:44:52 +0000] downloader: Deleting content of directory /tmp/opsworks-downloader.qYcgHojc
    virtualbox-iso: [Fri, 18 Mar 2016 13:46:52 +0000] downloader: [ERROR] File size test failed. HTTP/1.1 200 OK url: https://opsworks-instance-assets.s3.amazonaws.com/packages/ubuntu/14.04/opsworks-agent-ruby_2.0.0-p645-1_amd64.deb
    virtualbox-iso: [Fri, 18 Mar 2016 13:46:52 +0000] downloader: Retrying download after 10 seconds
    virtualbox-iso: [Fri, 18 Mar 2016 13:47:02 +0000] downloader: Deleting content of directory /tmp/opsworks-downloader.qYcgHojc
    virtualbox-iso: [Fri, 18 Mar 2016 13:49:02 +0000] downloader: [ERROR] File size test failed. HTTP/1.1 200 OK url: https://opsworks-instance-assets.s3.amazonaws.com/packages/ubuntu/14.04/opsworks-agent-ruby_2.0.0-p645-1_amd64.deb
    virtualbox-iso: [Fri, 18 Mar 2016 13:49:02 +0000] downloader: Retrying download after 15 seconds
    virtualbox-iso: [Fri, 18 Mar 2016 13:49:17 +0000] downloader: Deleting content of directory /tmp/opsworks-downloader.qYcgHojc
    virtualbox-iso: [Fri, 18 Mar 2016 13:51:17 +0000] downloader: [ERROR] File size test failed. HTTP/1.1 200 OK url: https://opsworks-instance-assets.s3.amazonaws.com/packages/ubuntu/14.04/opsworks-agent-ruby_2.0.0-p645-1_amd64.deb
    virtualbox-iso: [Fri, 18 Mar 2016 13:51:17 +0000] downloader: Retrying download after 20 seconds
    virtualbox-iso: [Fri, 18 Mar 2016 13:51:37 +0000] downloader: Deleting content of directory /tmp/opsworks-downloader.qYcgHojc
    virtualbox-iso: [Fri, 18 Mar 2016 13:53:37 +0000] downloader: [ERROR] File size test failed. HTTP/1.1 200 OK url: https://opsworks-instance-assets.s3.amazonaws.com/packages/ubuntu/14.04/opsworks-agent-ruby_2.0.0-p645-1_amd64.deb
    virtualbox-iso: [Fri, 18 Mar 2016 13:53:37 +0000] downloader: Retrying download after 25 seconds
    virtualbox-iso: [Fri, 18 Mar 2016 13:54:02 +0000] downloader: Deleting content of directory /tmp/opsworks-downloader.qYcgHojc
    virtualbox-iso: [Fri, 18 Mar 2016 13:56:02 +0000] downloader: [ERROR] File size test failed. HTTP/1.1 200 OK url: https://opsworks-instance-assets.s3.amazonaws.com/packages/ubuntu/14.04/opsworks-agent-ruby_2.0.0-p645-1_amd64.deb
    virtualbox-iso: [Fri, 18 Mar 2016 13:56:02 +0000] downloader: Retrying download after 30 seconds
    virtualbox-iso: [Fri, 18 Mar 2016 13:56:32 +0000] downloader: Deleting content of directory /tmp/opsworks-downloader.qYcgHojc
    virtualbox-iso: [Fri, 18 Mar 2016 13:58:33 +0000] downloader: [ERROR] File size test failed. HTTP/1.1 200 OK url: https://opsworks-instance-assets.s3.amazonaws.com/packages/ubuntu/14.04/opsworks-agent-ruby_2.0.0-p645-1_amd64.deb
    virtualbox-iso: [Fri, 18 Mar 2016 13:58:33 +0000] downloader: Retrying download after 35 seconds
    virtualbox-iso: [Fri, 18 Mar 2016 13:59:08 +0000] downloader: Deleting content of directory /tmp/opsworks-downloader.qYcgHojc

packer vm hangs in opsworks_berkshelf recipe

Hello guys, thanks for this tool, seems great.

I have an issue installing it though. I run rake build it does everything and it hangs in executing the opsworks_berkshelf::intall recipe till is timed out.

virtualbox-iso: [2016-04-21T10:05:04+00:00] INFO: Processing package[opsworks-berkshelf] action remove (opsworks_berkshelf::purge line 1)
    virtualbox-iso: [2016-04-21T10:05:04+00:00] INFO: Processing gem_package[berkshelf] action purge (opsworks_berkshelf::purge line 6)
    virtualbox-iso: [2016-04-21T10:05:05+00:00] INFO: Processing log[delete repo] action nothing (opsworks_berkshelf::purge line 16)
    virtualbox-iso: [2016-04-21T10:05:05+00:00] INFO: Processing directory[/opt/aws/opsworks/current/berkshelf-cookbooks] action delete (opsworks_berkshelf::purge line 21)
    virtualbox-iso: [2016-04-21T10:05:05+00:00] INFO: Processing log[downloading] action nothing (opsworks_berkshelf::install line 8)
    virtualbox-iso: [2016-04-21T10:05:05+00:00] INFO: Processing package[git-core] action install (opsworks_berkshelf::install line 9)
    virtualbox-iso: [2016-04-21T10:05:05+00:00] INFO: Processing opsworks_commons_assets_installer[Try to install berkshelf prebuilt package] action install (opsworks_berkshelf::install line 18)
    virtualbox-iso: [Thu, 21 Apr 2016 10:05:05 +0000] downloader: Successfully created temporary download directory. (/var/lib/aws/opsworks/cache.stage1/opsworks_assets/opsworks-berkshelf.69wtBR4N)
    virtualbox-iso: [Thu, 21 Apr 2016 10:05:28 +0000] downloader: File size test passed.
    virtualbox-iso: [Thu, 21 Apr 2016 10:05:28 +0000] downloader: Checksum proof skipped.
    virtualbox-iso: [Thu, 21 Apr 2016 10:05:28 +0000] downloader: Successfully downloaded https://opsworks-instance-assets-us-east-1.s3.amazonaws.com/packages/ubuntu/14.04/opsworks-berkshelf_3.2.0-1_amd64.deb
    virtualbox-iso: [2016-04-21T10:05:28+00:00] WARN: Cloning resource attributes for package[opsworks-berkshelf] from prior resource (CHEF-3694)
    virtualbox-iso: [2016-04-21T10:05:28+00:00] WARN: Previous package[opsworks-berkshelf]: /var/lib/aws/opsworks/cache.stage1/cookbooks/opsworks_berkshelf/recipes/purge.rb:1:in `from_file'
    virtualbox-iso: [2016-04-21T10:05:28+00:00] WARN: Current  package[opsworks-berkshelf]: /var/lib/aws/opsworks/cache.stage1/cookbooks/opsworks_commons/providers/assets_installer.rb:6:in `block (2 levels) in class_from_file'
    virtualbox-iso: [2016-04-21T10:05:28+00:00] INFO: Processing package[opsworks-berkshelf] action install (/var/lib/aws/opsworks/cache.stage1/cookbooks/opsworks_commons/providers/assets_installer.rb line 6)
    virtualbox-iso: rm -rf /var/lib/aws/opsworks/cache.stage1/opsworks_assets/opsworks-berkshelf.69wtBR4N
    virtualbox-iso: [2016-04-21T10:05:32+00:00] INFO: Processing package[opsworks-berkshelf] action nothing (/var/lib/aws/opsworks/cache.stage1/cookbooks/opsworks_commons/providers/assets_installer.rb line 6)
    virtualbox-iso: [2016-04-21T10:05:32+00:00] INFO: Processing log[installing gem] action nothing (opsworks_berkshelf::install line 32)
    virtualbox-iso: [2016-04-21T10:05:32+00:00] INFO: Processing gem_package[berkshelf] action install (opsworks_berkshelf::install line 39)
    virtualbox-iso: [2016-04-21T10:05:32+00:00] INFO: Processing opsworks_berkshelf_runner[Install berkshelf cookbooks] action berks_install (opsworks_berkshelf::install line 54)
    virtualbox-iso: [2016-04-21T10:05:32+00:00] WARN: Cloning resource attributes for directory[/opt/aws/opsworks/current/berkshelf-cookbooks] from prior resource (CHEF-3694)
    virtualbox-iso: [2016-04-21T10:05:32+00:00] WARN: Previous directory[/opt/aws/opsworks/current/berkshelf-cookbooks]: /var/lib/aws/opsworks/cache.stage1/cookbooks/opsworks_berkshelf/recipes/purge.rb:21:in `from_file'
    virtualbox-iso: [2016-04-21T10:05:32+00:00] WARN: Current  directory[/opt/aws/opsworks/current/berkshelf-cookbooks]: /var/lib/aws/opsworks/cache.stage1/cookbooks/opsworks_berkshelf/providers/runner.rb:2:in `block in class_from_file'
    virtualbox-iso: [2016-04-21T10:05:32+00:00] INFO: Processing directory[/opt/aws/opsworks/current/berkshelf-cookbooks] action delete (/var/lib/aws/opsworks/cache.stage1/cookbooks/opsworks_berkshelf/providers/runner.rb line 2)
    virtualbox-iso: [2016-04-21T10:05:32+00:00] INFO: Processing ruby_block[Install the cookbooks specified in the Berksfile and their dependencies] action run (/var/lib/aws/opsworks/cache.stage1/cookbooks/opsworks_berkshelf/providers/runner.rb line 11)
cat     virtualbox-iso:
    virtualbox-iso: ================================================================================
    virtualbox-iso: Error executing action `run` on resource 'ruby_block[Install the cookbooks specified in the Berksfile and their dependencies]'
    virtualbox-iso: ================================================================================
    virtualbox-iso:
    virtualbox-iso:
    virtualbox-iso: Mixlib::ShellOut::CommandTimeout
    virtualbox-iso: --------------------------------
    virtualbox-iso: Command timed out after 1200s:
    virtualbox-iso: Command execeded allowed execution time, process terminated
    virtualbox-iso: ---- Begin output of /opt/aws/opsworks/local/bin/berks vendor /opt/aws/opsworks/current/berkshelf-cookbooks ----
    virtualbox-iso: STDOUT: Resolving cookbook dependencies...
    virtualbox-iso: Fetching cookbook index from https://supermarket.getchef.com...
    virtualbox-iso: STDERR:
    virtualbox-iso: ---- End output of /opt/aws/opsworks/local/bin/berks vendor /opt/aws/opsworks/current/berkshelf-cookbooks ----
    virtualbox-iso: Ran /opt/aws/opsworks/local/bin/berks vendor /opt/aws/opsworks/current/berkshelf-cookbooks returned
    virtualbox-iso:
    virtualbox-iso:
    virtualbox-iso: Cookbook Trace:
    virtualbox-iso: ---------------
    virtualbox-iso: /var/lib/aws/opsworks/cache.stage1/cookbooks/opsworks_commons/libraries/shellout.rb:8:in `shellout'
    virtualbox-iso: /var/lib/aws/opsworks/cache.stage1/cookbooks/opsworks_berkshelf/providers/runner.rb:13:in `block (3 levels) in class_from_file'
    virtualbox-iso:
    virtualbox-iso:
    virtualbox-iso: Resource Declaration:
    virtualbox-iso: ---------------------
    virtualbox-iso: # In /var/lib/aws/opsworks/cache.stage1/cookbooks/opsworks_berkshelf/providers/runner.rb
    virtualbox-iso:
    virtualbox-iso: 11:   ruby_block 'Install the cookbooks specified in the Berksfile and their dependencies' do
    virtualbox-iso: 12:     block do
    virtualbox-iso: 13:       Chef::Log.info OpsWorks::ShellOut.shellout(
    virtualbox-iso: 14:         berks_install_command,
    virtualbox-iso: 15:         :cwd => ::File.dirname(OpsWorks::Berkshelf.berksfile),
    virtualbox-iso: 16:         :environment  => {
    virtualbox-iso: 17:           "BERKSHELF_PATH" => Opsworks::InstanceAgent::Environment.berkshelf_cache_path,
    virtualbox-iso: 18:           "LC_ALL" => "en_US.UTF-8"
    virtualbox-iso: 19:         }
    virtualbox-iso: 20:       )
    virtualbox-iso: 21:
    virtualbox-iso: 22:       ::FileUtils.rm_rf Opsworks::InstanceAgent::Environment.berkshelf_cache_path
    virtualbox-iso: 23:     end
    virtualbox-iso: 24:
    virtualbox-iso: 25:     only_if do
    virtualbox-iso: 26:       OpsWorks::Berkshelf.berkshelf_installed? && OpsWorks::Berkshelf.berksfile_available?
    virtualbox-iso: 27:     end
    virtualbox-iso: 28:   end
    virtualbox-iso: 29: end
    virtualbox-iso:
    virtualbox-iso:
    virtualbox-iso:
    virtualbox-iso: Compiled Resource:
    virtualbox-iso: ------------------
    virtualbox-iso: # Declared in /var/lib/aws/opsworks/cache.stage1/cookbooks/opsworks_berkshelf/providers/runner.rb:11:in `block in class_from_file'
    virtualbox-iso:
    virtualbox-iso: ruby_block("Install the cookbooks specified in the Berksfile and their dependencies") do
    virtualbox-iso: action "run"
    virtualbox-iso: retries 0
    virtualbox-iso: retry_delay 2
    virtualbox-iso: block_name "Install the cookbooks specified in the Berksfile and their dependencies"
    virtualbox-iso: cookbook_name "opsworks_berkshelf"
    virtualbox-iso: block #<Proc:0x00564d457f1fc8@/var/lib/aws/opsworks/cache.stage1/cookbooks/opsworks_berkshelf/providers/runner.rb:12>
    virtualbox-iso: only_if { #code block }
    virtualbox-iso: end
    virtualbox-iso:
    virtualbox-iso:
    virtualbox-iso:
    virtualbox-iso: [2016-04-21T10:28:43+00:00] INFO: Running queued delayed notifications before re-raising exception
    virtualbox-iso: [2016-04-21T10:28:43+00:00] ERROR: Running exception handlers
    virtualbox-iso: [2016-04-21T10:28:43+00:00] ERROR: Exception handlers complete
    virtualbox-iso: [2016-04-21T10:28:43+00:00] FATAL: Stacktrace dumped to /var/lib/aws/opsworks/cache.stage1/chef-stacktrace.out
    virtualbox-iso: [2016-04-21T10:28:43+00:00] ERROR: ruby_block[Install the cookbooks specified in the Berksfile and their dependencies] (/var/lib/aws/opsworks/cache.stage1/cookbooks/opsworks_berkshelf/providers/runner.rb line 11) had an error: Mixlib::ShellOut::CommandTimeout: Command timed out after 1200s:
    virtualbox-iso: Command execeded allowed execution time, process terminated
    virtualbox-iso: ---- Begin output of /opt/aws/opsworks/local/bin/berks vendor /opt/aws/opsworks/current/berkshelf-cookbooks ----
    virtualbox-iso: STDOUT: Resolving cookbook dependencies...
    virtualbox-iso: Fetching cookbook index from https://supermarket.chef.io...
    virtualbox-iso: STDERR:
    virtualbox-iso: ---- End output of /opt/aws/opsworks/local/bin/berks vendor /opt/aws/opsworks/current/berkshelf-cookbooks ----
    virtualbox-iso: Ran /opt/aws/opsworks/local/bin/berks vendor /opt/aws/opsworks/current/berkshelf-cookbooks returned
    virtualbox-iso: [2016-04-21T10:28:43+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
    virtualbox-iso: Waiting for process 10333
    virtualbox-iso: pid 10333 exited with status 256, exit code: 1 (time=1439 sec)
    virtualbox-iso: [2016-04-21 10:28:43] ERROR [opsworks-agent(10326)]: Chef run failed with exitcode 1
    virtualbox-iso: error: Chef run failed with exitcode 1

Timeout waiting for SSH

When trying to run rake build install:

==> Rake: Building ubuntu1404 for virtualbox
rm -f build/ubuntu1404-opsworks-virtualbox.box && packer build -only=virtualbox-iso template/ubuntu1404.json
virtualbox-iso output will be in this color.

==> virtualbox-iso: Downloading or copying Guest additions
virtualbox-iso: Downloading or copying: file:///Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso
==> virtualbox-iso: Downloading or copying ISO
virtualbox-iso: Downloading or copying: http://releases.ubuntu.com/14.04/ubuntu-14.04.3-server-amd64.iso
virtualbox-iso: Download progress: 0%
virtualbox-iso: Download progress: 1%
virtualbox-iso: Download progress: 2%
virtualbox-iso: Download progress: 4%
virtualbox-iso: Download progress: 7%
virtualbox-iso: Download progress: 10%
virtualbox-iso: Download progress: 13%
virtualbox-iso: Download progress: 16%
virtualbox-iso: Download progress: 19%
virtualbox-iso: Download progress: 22%
virtualbox-iso: Download progress: 25%
virtualbox-iso: Download progress: 28%
virtualbox-iso: Download progress: 31%
virtualbox-iso: Download progress: 34%
virtualbox-iso: Download progress: 37%
virtualbox-iso: Download progress: 40%
virtualbox-iso: Download progress: 41%
virtualbox-iso: Download progress: 43%
virtualbox-iso: Download progress: 45%
virtualbox-iso: Download progress: 48%
virtualbox-iso: Download progress: 51%
virtualbox-iso: Download progress: 51%
virtualbox-iso: Download progress: 51%
virtualbox-iso: Download progress: 52%
virtualbox-iso: Download progress: 53%
virtualbox-iso: Download progress: 54%
virtualbox-iso: Download progress: 56%
virtualbox-iso: Download progress: 58%
virtualbox-iso: Download progress: 60%
virtualbox-iso: Download progress: 63%
virtualbox-iso: Download progress: 65%
virtualbox-iso: Download progress: 68%
virtualbox-iso: Download progress: 71%
virtualbox-iso: Download progress: 74%
virtualbox-iso: Download progress: 77%
virtualbox-iso: Download progress: 80%
virtualbox-iso: Download progress: 81%
virtualbox-iso: Download progress: 82%
virtualbox-iso: Download progress: 83%
virtualbox-iso: Download progress: 84%
virtualbox-iso: Download progress: 85%
virtualbox-iso: Download progress: 86%
virtualbox-iso: Download progress: 86%
virtualbox-iso: Download progress: 87%
virtualbox-iso: Download progress: 88%
virtualbox-iso: Download progress: 90%
virtualbox-iso: Download progress: 91%
virtualbox-iso: Download progress: 92%
virtualbox-iso: Download progress: 93%
virtualbox-iso: Download progress: 95%
virtualbox-iso: Download progress: 98%
==> virtualbox-iso: Starting HTTP server on port 8045
==> virtualbox-iso: Creating virtual machine...
==> virtualbox-iso: Creating hard drive...
==> virtualbox-iso: Creating forwarded port mapping for SSH (host port 4378)
==> virtualbox-iso: Starting the virtual machine...
virtualbox-iso: WARNING: The VM will be started in headless mode, as configured.
virtualbox-iso: In headless mode, errors during the boot sequence or OS setup
virtualbox-iso: won't be easily visible. Use at your own discretion.
==> virtualbox-iso: Waiting 5s for boot...
==> virtualbox-iso: Typing the boot command...
==> virtualbox-iso: Waiting for SSH to become available...
==> virtualbox-iso: Timeout waiting for SSH.
==> virtualbox-iso: Unregistering and deleting virtual machine...
==> virtualbox-iso: Deleting output directory...
Build 'virtualbox-iso' errored: Timeout waiting for SSH.

==> Some builds didn't complete successfully and had errors:
--> virtualbox-iso: Timeout waiting for SSH.

==> Builds finished but no artifacts were created.
rake aborted!
Command failed with status (1): [rm -f build/ubuntu1404-opsworks-virtualbox...]
/Users/brentonmorris/Software/opsworks-vm/Rakefile:47:in build_box' /Users/brentonmorris/Software/opsworks-vm/Rakefile:9:inblock (3 levels) in <top (required)>'
Tasks: TOP => build => virtualbox:build
(See full trace by running task with --trace)

Seems like the box is still installing the OS and packer times out waiting for SSH, then deletes the box and closes.

Edit: I should add that I am running OSX 10.11.2 and have the latest homebrew versions of vagrant, rake and packer.

Red Hat mock?

This project looks like it could be very helpful to us, but the default OS used by OpsWorks is Amazon Linux, which is based on Red Hat; some of our recipes aren't compatible with Ubuntu. Is there a straightforward way to mock a CentOS or similar system?

broken ISO link

I get the following error when I run 'rake build install --trace'
`
** Invoke build (first_time)
** Invoke virtualbox:build (first_time)
** Execute virtualbox:build
==> Rake: Building ubuntu1404 for virtualbox
rm -f build/ubuntu1404-opsworks-virtualbox.box && packer build -only=virtualbox-iso template/ubuntu1404.json
virtualbox-iso output will be in this color.

==> virtualbox-iso: Downloading or copying Guest additions
virtualbox-iso: Downloading or copying: file:///Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso
==> virtualbox-iso: Downloading or copying ISO
virtualbox-iso: Downloading or copying: http://releases.ubuntu.com/14.04/ubuntu-14.04.4-server-amd64.iso
virtualbox-iso: Error downloading: checksums didn't match expected: 3ffb7a3690ce9a07ac4a4d1b829f990681f7e47d
virtualbox-iso: Downloading or copying: http://nl.releases.ubuntu.com/14.04/ubuntu-14.04.4-server-amd64.iso
virtualbox-iso: Error downloading: checksums didn't match expected: 3ffb7a3690ce9a07ac4a4d1b829f990681f7e47d
==> virtualbox-iso: ISO download failed.
Build 'virtualbox-iso' errored: ISO download failed.

==> Some builds didn't complete successfully and had errors:
--> virtualbox-iso: ISO download failed.

==> Builds finished but no artifacts were created.
rake aborted!
Command failed with status (1): [rm -f build/ubuntu1404-opsworks-virtualbox...]
/Users/user/.rvm/gems/ruby-2.1.9/gems/rake-12.0.0/lib/rake/file_utils.rb:66:in block in create_shell_runner' /Users/user/.rvm/gems/ruby-2.1.9/gems/rake-12.0.0/lib/rake/file_utils.rb:56:in call'
/Users/user/.rvm/gems/ruby-2.1.9/gems/rake-12.0.0/lib/rake/file_utils.rb:56:in sh' /Users/user/opsworks-vm/Rakefile:47:in build_box'
/Users/user/opsworks-vm/Rakefile:9:in block (3 levels) in <top (required)>' /Users/user/.rvm/gems/ruby-2.1.9/gems/rake-12.0.0/lib/rake/task.rb:250:in call'
/Users/user/.rvm/gems/ruby-2.1.9/gems/rake-12.0.0/lib/rake/task.rb:250:in block in execute' /Users/user/.rvm/gems/ruby-2.1.9/gems/rake-12.0.0/lib/rake/task.rb:250:in each'
/Users/user/.rvm/gems/ruby-2.1.9/gems/rake-12.0.0/lib/rake/task.rb:250:in execute' /Users/user/.rvm/gems/ruby-2.1.9/gems/rake-12.0.0/lib/rake/task.rb:194:in block in invoke_with_call_chain'
/Users/user/.rvm/rubies/ruby-2.1.9/lib/ruby/2.1.0/monitor.rb:211:in mon_synchronize' /Users/user/.rvm/gems/ruby-2.1.9/gems/rake-12.0.0/lib/rake/task.rb:187:in invoke_with_call_chain'
/Users/user/.rvm/gems/ruby-2.1.9/gems/rake-12.0.0/lib/rake/task.rb:216:in block in invoke_prerequisites' /Users/user/.rvm/gems/ruby-2.1.9/gems/rake-12.0.0/lib/rake/task.rb:214:in each'
/Users/user/.rvm/gems/ruby-2.1.9/gems/rake-12.0.0/lib/rake/task.rb:214:in invoke_prerequisites' /Users/user/.rvm/gems/ruby-2.1.9/gems/rake-12.0.0/lib/rake/task.rb:193:in block in invoke_with_call_chain'
/Users/user/.rvm/rubies/ruby-2.1.9/lib/ruby/2.1.0/monitor.rb:211:in mon_synchronize' /Users/user/.rvm/gems/ruby-2.1.9/gems/rake-12.0.0/lib/rake/task.rb:187:in invoke_with_call_chain'
/Users/user/.rvm/gems/ruby-2.1.9/gems/rake-12.0.0/lib/rake/task.rb:180:in invoke' /Users/user/.rvm/gems/ruby-2.1.9/gems/rake-12.0.0/lib/rake/application.rb:152:in invoke_task'
/Users/user/.rvm/gems/ruby-2.1.9/gems/rake-12.0.0/lib/rake/application.rb:108:in block (2 levels) in top_level' /Users/user/.rvm/gems/ruby-2.1.9/gems/rake-12.0.0/lib/rake/application.rb:108:in each'
/Users/user/.rvm/gems/ruby-2.1.9/gems/rake-12.0.0/lib/rake/application.rb:108:in block in top_level' /Users/user/.rvm/gems/ruby-2.1.9/gems/rake-12.0.0/lib/rake/application.rb:117:in run_with_threads'
/Users/user/.rvm/gems/ruby-2.1.9/gems/rake-12.0.0/lib/rake/application.rb:102:in top_level' /Users/user/.rvm/gems/ruby-2.1.9/gems/rake-12.0.0/lib/rake/application.rb:80:in block in run'
/Users/user/.rvm/gems/ruby-2.1.9/gems/rake-12.0.0/lib/rake/application.rb:178:in standard_exception_handling' /Users/user/.rvm/gems/ruby-2.1.9/gems/rake-12.0.0/lib/rake/application.rb:77:in run'
/Users/user/.rvm/gems/ruby-2.1.9/gems/rake-12.0.0/exe/rake:27:in <top (required)>' /Users/user/.rvm/gems/ruby-2.1.9/bin/rake:23:in load'
/Users/user/.rvm/gems/ruby-2.1.9/bin/rake:23:in <main>' /Users/user/.rvm/gems/ruby-2.1.9/bin/ruby_executable_hooks:15:in eval'
/Users/user/.rvm/gems/ruby-2.1.9/bin/ruby_executable_hooks:15:in <main>' Tasks: TOP => build => virtualbox:build

The ISO link for ubuntu 14.04 seems broken.

GuestAdditions seems to be installed (4.3.20) correctly, but not running.

I ran from a clean clone:

git submodule update --init --recursive
rake build
rake install
cd example
vagrant up

This is the output I am getting:

$ vagrant up
Bringing machine 'app' up with 'virtualbox' provider...
Bringing machine 'db' up with 'virtualbox' provider...
==> app: Importing base box 'ubuntu1404-opsworks'...
==> app: Matching MAC address for NAT networking...
==> app: Setting the name of the VM: example_app_1446752133367_38334
==> app: Fixed port collision for 22 => 2222. Now on port 2200.
==> app: Clearing any previously set network interfaces...
==> app: Preparing network interfaces based on configuration...
    app: Adapter 1: nat
    app: Adapter 2: hostonly
==> app: Forwarding ports...
    app: 80 => 8080 (adapter 1)
    app: 22 => 2200 (adapter 1)
==> app: Booting VM...
==> app: Waiting for machine to boot. This may take a few minutes...
    app: SSH address: 127.0.0.1:2200
    app: SSH username: vagrant
    app: SSH auth method: private key
    app: Warning: Connection timeout. Retrying...
    app:
    app: Vagrant insecure key detected. Vagrant will automatically replace
    app: this with a newly generated keypair for better security.
    app:
    app: Inserting generated public key within guest...
    app: Removing insecure key from the guest if it's present...
    app: Key inserted! Disconnecting and reconnecting using new SSH key...
==> app: Machine booted and ready!
GuestAdditions seems to be installed (4.3.20) correctly, but not running.
Usage: service < option > | --status-all | [ service_name [ command | --full-restart ] ]
bash: line 3: vboxadd: command not found
Removing existing VirtualBox DKMS kernel modules ...done.
Removing existing VirtualBox non-DKMS kernel modules ...done.
Building the VirtualBox Guest Additions kernel modules
The headers for the current running kernel were not found. If the following
module compilation fails then this could be the reason.

Building the main Guest Additions module ...fail!
(Look at /var/log/vboxadd-install.log to find out what went wrong)
Doing non-kernel setup of the Guest Additions ...done.
Restarting VM to apply changes...
==> app: Attempting graceful shutdown of VM...
==> app: Booting VM...
==> app: Waiting for machine to boot. This may take a few minutes...
    app: SSH address: 127.0.0.1:2200
    app: SSH username: vagrant
    app: SSH auth method: private key
    app: Warning: Connection timeout. Retrying...
==> app: Machine booted and ready!
==> app: Checking for guest additions in VM...
==> app: Configuring and enabling network interfaces...
==> app: Mounting shared folders...
    app: /vagrant => /Users/felix/opsworks-vm/example

and here is the contents of /var/log/vboxadd-install.log:

vagrant@opsworks-vagrant:~$ cat /var/log/vboxadd-install.log
Uninstalling modules from DKMS
  removing old DKMS module vboxguest version  4.3.20

------------------------------
Deleting module version: 4.3.20
completely from the DKMS tree.
------------------------------
Done.
Attempting to install using DKMS
Error! Could not find module source directory.
Directory: /usr/src/vboxguest-4.3.20 does not exist.
Failed to install using DKMS, attempting to install without
/tmp/vbox.0/Makefile.include.header:97: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again.  Stop.
Creating user for the Guest Additions.
Creating udev rule for the Guest Additions kernel module.

I am on OSX 10.9.4, and have virtual box 5.0.8 installed.

periodic timout of 60-110 seconds when starting opsworks-agent

Thanks so much for making opsworks-vm available -- we love it!!

This probably isn't a bug with opsworks-vm but it is behavior I only see when using opsworks-vm so I thought I'd post it. Feel free to close it if you don't think it is appropriate to open here.

Most of the time during a vagrant up/provision we have a delay of 60-110 seconds right as the opsworks-agent is starting. The log shows 6-11 "sleep 10 sec" messages (see below). We have tracked it down to the /opt/aws/opsworks/current/bin/opsworks-agent-updater process which is kicked off at the beginning of each run. If we have a vagrant ssh up and manually kill the opsworks-agent-updater process then the run is not delayed.

Has anyone seen this or know what we can do to keep it from happening?

Here is the log with the sleeps that happen during a vagrant up/provision:

default: Running: inline script
==> default: Checking dependencies...
==> default: Reading input...
==> default: Processing 'recipes.json'...
==> default: Processing 'ops/opsworks/[REDACTED].json'...
==> default: Processing 'ops/dna/[REDACTED].json'...
==> default: Parsing deployments...
==> default: Parsing custom cookbooks...
==> default: Purging local cookbooks cache from '/opt/aws/opsworks/current/site-cookbooks'...
==> default: Generating dna.json...
==> default: Running opsworks agent...
==> default: [2015-10-16 21:54:33]  INFO [opsworks-agent(7456)]: About to run custom custom command from: /tmp/vagrant-opsworks20151016-7438-3rkgmo/dna.json
==> default: (locked: sleeping 10 secs)
==> default: (locked: sleeping 10 secs)
==> default: (locked: sleeping 10 secs)
==> default: (locked: sleeping 10 secs)
==> default: (locked: sleeping 10 secs)
==> default: (locked: sleeping 10 secs)
==> default: (locked: sleeping 10 secs)
==> default: (locked: sleeping 10 secs)
==> default: (locked: sleeping 10 secs)
==> default: (locked: sleeping 10 secs)
==> default: (locked: sleeping 10 secs)
==> default: (locked: sleeping 10 secs)
==> default: [Fri Oct 16 21:56:33 2015] About to execute: RUBYOPT="-E utf-8" /opt/aws/opsworks/current/bin/chef-client -j /var/lib/aws/opsworks/chef/2015-10-16-21-54-33-01.json -c /var/lib/aws/opsworks/client.stage1.rb -o opsworks_custom_cookbooks::load,opsworks_custom_cookbooks::execute 2>&1
==> default: [2015-10-16T21:56:34+00:00] INFO: Starting chef-zero on port 8889 with repository at repository at /opt/aws/opsworks/current
==> default:   One version per cookbook
==> default:   data_bags at /var/lib/aws/opsworks/data/data_bags
==> default:   nodes at /var/lib/aws/opsworks/data/nodes
==> default: [2015-10-16T21:56:34+00:00] INFO: Forking chef instance to converge...
==> default: [2015-10-16T21:56:34+00:00] INFO: *** Chef 11.10.4 ***
==> default: [2015-10-16T21:56:34+00:00] INFO: Chef-client pid: 7674

Here are the processes we see running if we have a vagrant ssh up during the run:

root      6419  6418  0 22:09 ?        00:00:00 /bin/sh -c cd /opt/aws/opsworks/current && bin/lockrun --verbose --lockfile=/var/lib/aws/opsworks/lockrun.lock -- /opt/aws/opsworks/current/bin/opsworks-agent-updater
root      6421  6419  0 22:09 ?        00:00:00 bin/lockrun --verbose --lockfile /var/lib/aws/opsworks/lockrun.lock -- /opt/aws/opsworks/current/bin/opsworks-agent-updater
root      6422  6421  7 22:09 ?        00:00:00 /opt/aws/opsworks/local/bin/ruby /opt/aws/opsworks/current/bin/opsworks-agent-updater

If we manually ssh in and kill -9 6419 then everything continues without delay.

my.cnf template issue

Whenever I try to provision a database instance with db-master.json I get the error (undefined method name' for nil:NilClass) on line #1:` it seems that chef is using the chef mysql cookbook template file which depends on the a config array with the name attr instead of the one provided with opsworks? I don't have the mysql cookbook specified in my Berksfile so why would it be using that erb file?

Waiting for SSH to become available

Hi, first of all a huge thank you!!!

With that out of the way, when I clone the repo and run rake build it downloads the image, creates the virtual machine, hard drive, port forward mappings and finally starts the machine. However, it then gets stuck on "Waiting for SSH to become available" until it finally times out. I have seen this behaviour on the 2 out 2 OSX machines that I have tried this on. Any idea?

Unable to establish SSL connection.

    virtualbox-iso: ~/opsworks-installer.2M9G3YyC ~
    virtualbox-iso: Installing OpsWorks agent version 3432-20160120135248
    virtualbox-iso: Unable to establish SSL connection.
    virtualbox-iso:
    virtualbox-iso: gzip: stdin: unexpected end of file
    virtualbox-iso: tar: Child returned status 1
    virtualbox-iso: tar: Error is not recoverable: exiting now
    virtualbox-iso: /tmp/opsworks/opsworks: line 35: cd: opsworks-agent-installer/opsworks-agent/bin/: No such file or directory
    virtualbox-iso: /tmp/opsworks/opsworks: line 36: ./installer_wrapper.sh: No such file or directory
    virtualbox-iso: env: /opt/aws/opsworks/local/bin/ruby: No such file or directory

Build 'virtualbox-iso' errored: Script exited with non-zero exit status: 127

I can`t Install OpsWorks agent on ubuntu 14.04

ruby version : ruby 2.0.0p384 (2014-01-12) [x86_64-linux-gnu]
VirtualBox Version: 5.0

any thoughts? thank you.

prepare_deployments

It might be a lack of understanding on my behalf (probably), but it seems odd that prepare_deployment does not resolve the full path "/vagrant/#{path}". Mysteriously, the shipped example worked for me, but my own stuff doesn't. I have renamed my apps and so on, but it all looks consistent with what you have, apart from leaving out php-related recipes and so on. Once I resolve to the full path "/vagrant/#{path}" it all works.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.