{"id":44987,"date":"2013-08-02T15:32:46","date_gmt":"2013-08-02T12:32:46","guid":{"rendered":"https:\/\/www.altoros.com\/blog\/?p=44987"},"modified":"2019-07-10T00:10:39","modified_gmt":"2019-07-09T21:10:39","slug":"how-to-deploy-cloud-foundry-v2-to-aws-by-using-vagrant","status":"publish","type":"post","link":"https:\/\/www.altoros.com\/blog\/how-to-deploy-cloud-foundry-v2-to-aws-by-using-vagrant\/","title":{"rendered":"How to Deploy Cloud Foundry v2 to AWS by Using Vagrant"},"content":{"rendered":"<p>Recently, we published an article on the Cloud Foundry blog in which we explained how to install <a href=\"http:\/\/blog.cloudfoundry.com\/2013\/06\/27\/installing-cloud-foundry-on-vagrant\/\" target=\"_blank\" rel=\"noopener noreferrer\">Cloud Foundry with Vagrant<\/a>. Although BOSH is suggested as the official method of setting up a system, the way described in the article is easier and faster. This blog post found on the ActiveState blog adds some more details to the subject. Don\u2019t skip the comments made by our Argentinian team, in which we suggest the ways of automating some installation tasks.<\/p>\n<p>Read the full article <a href=\"https:\/\/dzone.com\/articles\/how-deploy-cloud-foundry-v2\" target=\"_blank\" rel=\"noopener noreferrer\">&#8220;How to Deploy Cloud Foundry v2 to AWS via Vagrant&#8221;<\/a> to learn the details.<\/p>\n<p>In this post, I&#8217;m going to quickly run through how I got up and running with Cloud Foundry v2. These notes are based on my colleague&#8217;s instructions, who is in the process of giving Cloud Foundry v2&#8217;s tires a good kicking.<\/p>\n<p>The easiest way to deploy Cloud Foundry version 2 (a.k.a &#8220;ng&#8221; or &#8220;next generation&#8221;) seems to be via Vagrant. The official way is via BOSH, but  we have created a method which makes it much easier to spin up a single instance of Cloud Foundry v2 on Amazon EC2. We found with BOSH we needed 14 instances to get up and running and it took much longer.<\/p>\n<p><a href=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2019\/07\/logo3.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2019\/07\/logo3.jpg\" alt=\"\" width=\"412\" height=\"71\" class=\"aligncenter size-full wp-image-44988\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.altoros.com\/blog\/how-to-deploy-cloud-foundry-v2-to-aws-by-using-vagrant\/#Install_the_installer\" >Install the installer<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.altoros.com\/blog\/how-to-deploy-cloud-foundry-v2-to-aws-by-using-vagrant\/#Install_Vagrant\" >Install Vagrant<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.altoros.com\/blog\/how-to-deploy-cloud-foundry-v2-to-aws-by-using-vagrant\/#Install_Vagrant_plug-ins\" >Install Vagrant plug-ins<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.altoros.com\/blog\/how-to-deploy-cloud-foundry-v2-to-aws-by-using-vagrant\/#Run_the_bootstrap\" >Run the bootstrap<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.altoros.com\/blog\/how-to-deploy-cloud-foundry-v2-to-aws-by-using-vagrant\/#Set_up_AWS_credentials\" >Set up AWS credentials<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.altoros.com\/blog\/how-to-deploy-cloud-foundry-v2-to-aws-by-using-vagrant\/#An_open_security_group\" >An open security group<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.altoros.com\/blog\/how-to-deploy-cloud-foundry-v2-to-aws-by-using-vagrant\/#Create_an_EC2_set-up_script\" >Create an EC2 set-up script<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.altoros.com\/blog\/how-to-deploy-cloud-foundry-v2-to-aws-by-using-vagrant\/#Build_the_EC2_instance_running_CFv2\" >Build the EC2 instance running CFv2<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.altoros.com\/blog\/how-to-deploy-cloud-foundry-v2-to-aws-by-using-vagrant\/#Push_an_app\" >Push an app<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.altoros.com\/blog\/how-to-deploy-cloud-foundry-v2-to-aws-by-using-vagrant\/#Delete_the_app\" >Delete the app<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/www.altoros.com\/blog\/how-to-deploy-cloud-foundry-v2-to-aws-by-using-vagrant\/#Inside_out\" >Inside out<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/www.altoros.com\/blog\/how-to-deploy-cloud-foundry-v2-to-aws-by-using-vagrant\/#Updating_more_config\" >Updating more config<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/www.altoros.com\/blog\/how-to-deploy-cloud-foundry-v2-to-aws-by-using-vagrant\/#Router-registry_bug\" >Router-registry bug<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/www.altoros.com\/blog\/how-to-deploy-cloud-foundry-v2-to-aws-by-using-vagrant\/#Restart_CC_DB\" >Restart CC DB<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/www.altoros.com\/blog\/how-to-deploy-cloud-foundry-v2-to-aws-by-using-vagrant\/#Related_video\" >Related video<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/www.altoros.com\/blog\/how-to-deploy-cloud-foundry-v2-to-aws-by-using-vagrant\/#Further_reading\" >Further reading<\/a><\/li><\/ul><\/nav><\/div>\n<h3><span class=\"ez-toc-section\" id=\"Install_the_installer\"><\/span>Install the installer<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>You start by git-cloning the <code style=\"color: black; background-color: #e6e6e6;\">cf-vagrant-installer<\/code> repository from GitHub.<\/p>\n<pre>\r\n$ git clone https:\/\/github.com\/Altoros\/cf-vagrant-installer\r\n$ cd cf-vagrant-installer\r\n$ cat README.md\r\n<\/pre>\n<p>As you will see in the README.md, there are a few vagrant dependencies, the first of which is Vagrant itself.<\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Install_Vagrant\"><\/span>Install Vagrant<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>If you do not have Vagrant installed, you can install it from <a href=\"https:\/\/www.vagrantup.com\/downloads\" rel=\"noopener noreferrer\" target=\"_blank\">http:\/\/downloads.vagrantup.com\/<\/a>. I installed the .dmg for my Mac, which was pretty straightforward.<\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Install_Vagrant_plug-ins\"><\/span>Install Vagrant plug-ins<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>The Vagrant plug-ins required (if they have not changed) were <code style=\"color: black; background-color: #e6e6e6;\">vagrant-berkshelf<\/code>, which adds Berkshelf integration to the Chef provisioners, <code style=\"color: black; background-color: #e6e6e6;\">vagrant-omnibus<\/code>, which ensures the desired version of Chef is installed via the platform-specific Omnibus packages, and <code style=\"color: black; background-color: #e6e6e6;\">vagrant-aws<\/code>, which adds an AWS provider to Vagrant, allowing Vagrant to control and provision machines in EC2.<\/p>\n<p>Installation of these plug-ins could not be simpler:<\/p>\n<pre>\r\n$ vagrant plugin install vagrant-berkshelf\r\n$ vagrant plugin install vagrant-omnibus\r\n$ vagrant plugin install vagrant-aws\r\n<\/pre>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Run_the_bootstrap\"><\/span>Run the bootstrap<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Next, make sure we are in the <code style=\"color: black; background-color: #e6e6e6;\">cf-vagrant-installer<\/code> (which we cloned above) directory and run the rake command to download all the Cloud Foundry components.<\/p>\n<pre>\r\n$ rake host:bootstrap\r\n<\/pre>\n<p>The output of this rake command will look something like this:<\/p>\n<pre>\r\n(in \/Users\/phil\/src\/cfv2\/cf-vagrant-installer)\r\n==> Init Git submodules\r\nSubmodule 'cloud_controller_ng' (https:\/\/github.com\/cloudfoundry\/cloud_controller_ng.git) registered for path 'cloud_controller_ng'\r\nSubmodule 'dea_ng' (https:\/\/github.com\/cloudfoundry-attic\/dea_ng.git) registered for path 'dea_ng'\r\nSubmodule 'gorouter' (https:\/\/github.com\/cloudfoundry\/gorouter.git) registered for path 'gorouter'\r\nSubmodule 'health_manager' (https:\/\/github.com\/cloudfoundry\/health_manager.git) registered for path 'health_manager'\r\nSubmodule 'uaa' (https:\/\/github.com\/cloudfoundry\/uaa.git) registered for path 'uaa'\r\nSubmodule 'warden' (git:\/\/github.com\/cloudfoundry\/warden.git) registered for path 'warden'\r\nCloning into 'cloud_controller_ng'...\r\nremote: Counting objects: 13057, done.\r\nremote: Compressing objects: 100% (7357\/7357), done.\r\nremote: Total 13057 (delta 7851), reused 10513 (delta 5512)\r\nReceiving objects: 100% (13057\/13057), 4.07 MiB | 1.34 MiB\/s, done.\r\nResolving deltas: 100% (7851\/7851), done.\r\nSubmodule path 'cloud_controller_ng': checked out '4b9208900c54181d539c9cc93519277d7c2702b5'\r\nSubmodule 'vendor\/errors' (https:\/\/github.com\/cloudfoundry\/errors.git) registered for path 'vendor\/errors'\r\nCloning into 'vendor\/errors'...\r\nremote: Counting objects: 58, done.\r\nremote: Compressing objects: 100% (45\/45), done.\r\n... (truncated) ...\r\n<\/pre>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Set_up_AWS_credentials\"><\/span>Set up AWS credentials<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Next, you will need to edit the <code style=\"color: black; background-color: #e6e6e6;\">Vagrantfile<\/code>:<\/p>\n<pre>\r\n$ vim Vagrantfile\r\n<\/pre>\n<p>Add the following section directly above the <code style=\"color: black; background-color: #e6e6e6;\">config.vm.provider :vmware_fusion<\/code> line:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nconfig.vm.provider :aws do |aws, override|\r\n    override.vm.box_url = &quot;http:\/\/files.vagrantup.com\/precise64.box&quot;\r\n\r\n    aws.access_key_id = &quot;YOUR AWS ACCESS KEY&quot;\r\n    aws.secret_access_key = &quot;YOUR AWS SECRET KEY&quot;\r\n    aws.keypair_name = &quot;YOUR AWS KEYPAIR NAME&quot;\r\n    aws.ami = &quot;ami-23d9a94a&quot;\r\n    aws.instance_type = &quot;m1.large&quot;\r\n    aws.region = &quot;us-east-1&quot;\r\n    aws.security_groups = &#x5B;&quot;open&quot;]\r\n\r\n    aws.user_data = File.read('ec2-setup.sh')\r\n\r\n    override.ssh.username = &quot;vagrant&quot;\r\n    override.ssh.private_key_path = &quot;THE LOCAL PATH TO YOUR AWS PRIVATE KEY&quot;\r\n  end\r\n<\/pre>\n<p>Then replace <code style=\"color: black; background-color: #e6e6e6;\">\"YOUR AWS ACCESS KEY\"<\/code>, <code style=\"color: black; background-color: #e6e6e6;\">\"YOUR AWS SECRET KEY\"<\/code>, and <code style=\"color: black; background-color: #e6e6e6;\">\"YOUR AWS KEYPAIR NAME\"<\/code> with your own AWS credentials.<\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"An_open_security_group\"><\/span>An open security group<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>The AWS security group used in the above example is one called &#8220;open.&#8221; This is just one with all open ports. You will need to create it if you do not have it already. You can do this through the AWS console.<\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Create_an_EC2_set-up_script\"><\/span>Create an EC2 set-up script<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Next, you&#8217;ll need to create an <code style=\"color: black; background-color: #e6e6e6;\">ec2-setup.sh<\/code> file directly in the <code style=\"color: black; background-color: #e6e6e6;\">cf-vagrant-installer<\/code> directory. It should look exactly like the following:<\/p>\n<pre>\r\n#!\/bin\/bash -ex\r\n\r\nusermod -l vagrant ubuntu\r\ngroupmod -n vagrant ubuntu\r\nusermod -d \/home\/vagrant -m vagrant\r\nmv \/etc\/sudoers.d\/90-cloudimg-ubuntu \/etc\/sudoers.d\/90-cloudimg-vagrant\r\nperl -pi -e \"s\/ubuntu\/vagrant\/g;\" \/etc\/sudoers.d\/90-cloudimg-vagrant\r\n<\/pre>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Build_the_EC2_instance_running_CFv2\"><\/span>Build the EC2 instance running CFv2<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Finally, run <code style=\"color: black; background-color: #e6e6e6;\">\"vagrant up --provider=aws\"<\/code> and your instance will be built:<\/p>\n<pre>\r\n$ vagrant up --provider=aws\r\n<\/pre>\n<p>My (truncated) output looked something like this:<\/p>\n<pre>\r\nBringing machine 'cf-install' up with 'aws' provider...\r\n[Berkshelf] Updating Vagrant's berkshelf: '\/Users\/phil\/.berkshelf\/cf-install\/vagrant\/berkshelf-20130717-81754-5vjx63-cf-install'\r\n[Berkshelf] Using apt (1.10.0)\r\n[Berkshelf] Using git (2.5.2)\r\n[Berkshelf] Using sqlite (1.0.0)\r\n[Berkshelf] Using mysql (3.0.2)\r\n[Berkshelf] Using postgresql (3.0.2)\r\n[Berkshelf] Using chef-golang (1.0.1)\r\n[Berkshelf] Using java (1.12.0)\r\n[Berkshelf] Using ruby_build (0.8.0)\r\n[Berkshelf] Installing rbenv (0.7.3) from git: 'git:\/\/github.com\/fnichol\/chef-rbenv.git' with branch: 'master' at ref: 'e10f98d5fd07bdb8d212ebf42160b65c39036b90'\r\n[Berkshelf] Using rbenv-alias (0.0.0) at '.\/chef\/rbenv-alias'\r\n[Berkshelf] Using rbenv-sudo (0.0.1) at '.\/chef\/rbenv-sudo'\r\n[Berkshelf] Using cloudfoundry (0.0.0) at '.\/chef\/cloudfoundry'\r\n[Berkshelf] Using dmg (1.1.0)\r\n[Berkshelf] Using build-essential (1.4.0)\r\n[Berkshelf] Using yum (2.3.0)\r\n[Berkshelf] Using windows (1.10.0)\r\n[Berkshelf] Using chef_handler (1.1.4)\r\n[Berkshelf] Using runit (1.1.6)\r\n[Berkshelf] Using openssl (1.0.2)\r\n[cf-install] Warning! The AWS provider doesn't support any of the Vagrant\r\nhigh-level network configurations (`config.vm.network`). They\r\nwill be silently ignored.\r\n[cf-install] Launching an instance with the following settings...\r\n[cf-install]  -- Type: m1.large\r\n[cf-install]  -- AMI: ami-23d9a94a\r\n[cf-install]  -- Region: us-east-1\r\n[cf-install]  -- Security Groups: [\"open\"]\r\n[cf-install] Waiting for instance to become \"ready\"...\r\n[cf-install] Waiting for SSH to become available...\r\n[cf-install] Machine is booted and ready for use!\r\n[cf-install] Rsyncing folder: \/Users\/phil\/src\/cfv2\/cf-vagrant-installer\/ => \/vagrant\r\n[cf-install] Rsyncing folder: \/Users\/phil\/.berkshelf\/cf-install\/vagrant\/berkshelf-20130717-81754-5vjx63-cf-install\/ => \/tmp\/vagrant-chef-1\/chef-solo-1\/cookbooks\r\n[cf-install] Installing Chef 11.4.0 Omnibus package...\r\n[cf-install] Running provisioner: chef_solo...\r\nGenerating chef JSON and uploading...\r\nRunning chef-solo...\r\nstdin: is not a tty\r\n[2013-07-17T19:43:22+00:00] INFO: *** Chef 11.4.0 ***\r\n[2013-07-17T19:43:23+00:00] INFO: Setting the run_list to [\"recipe[cloudfoundry::vagrant-provision-start]\", \"recipe[apt::default]\", \"recipe[git]\", \"recipe[chef-golang]\", \"recipe[ruby_build]\", \"recipe[rbenv::user]\", \"recipe\", \"recipe[sqlite]\", \"recipe[mysql::server]\", \"recipe[postgresql::server]\", \"recipe[rbenv-alias]\", \"recipe[rbenv-sudo]\", \"recipe[cloudfoundry::warden]\", \"recipe[cloudfoundry::dea]\", \"recipe[cloudfoundry::uaa]\", \"recipe[cloudfoundry::cf_bootstrap]\", \"recipe[cloudfoundry::vagrant-provision-end]\"] from JSON\r\n[2013-07-17T19:43:23+00:00] INFO: Run List is [recipe[cloudfoundry::vagrant-provision-start], recipe[apt::default], recipe[git], recipe[chef-golang], recipe[ruby_build], recipe[rbenv::user], recipe, recipe[sqlite], recipe[mysql::server], recipe[postgresql::server], recipe[rbenv-alias], recipe[rbenv-sudo], recipe[cloudfoundry::warden], recipe[cloudfoundry::dea], recipe[cloudfoundry::uaa], recipe[cloudfoundry::cf_bootstrap], recipe[cloudfoundry::vagrant-provision-end]]\r\n[2013-07-17T19:43:23+00:00] INFO: Run List expands to [cloudfoundry::vagrant-provision-start, apt::default, git, chef-golang, ruby_build, rbenv::user, java::openjdk, sqlite, mysql::server, postgresql::server, rbenv-alias, rbenv-sudo, cloudfoundry::warden, cloudfoundry::dea, cloudfoundry::uaa, cloudfoundry::cf_bootstrap, cloudfoundry::vagrant-provision-end]\r\n[2013-07-17T19:43:23+00:00] INFO: Starting Chef Run for ip-10-77-71-207.ec2.internal\r\n[2013-07-17T19:43:23+00:00] INFO: Running start handlers\r\n[2013-07-17T19:43:23+00:00] INFO: Start handlers complete.\r\n[2013-07-17T19:43:24+00:00] INFO: AptPreference light-weight provider already initialized -- overriding!\r\n... (truncated) ...\r\n[2013-07-17T19:58:50+00:00] INFO: Processing package[zip] action install (cloudfoundry::dea line 9)\r\n[2013-07-17T19:58:55+00:00] INFO: Processing package[unzip] action install (cloudfoundry::dea line 13)\r\n[2013-07-17T19:58:55+00:00] INFO: Processing package[maven] action install (cloudfoundry::uaa line 1)\r\n[2013-07-17T19:59:38+00:00] INFO: Processing execute[run rake cf:bootstrap] action run (cloudfoundry::cf_bootstrap line 3)\r\n[2013-07-17T20:05:35+00:00] INFO: execute[run rake cf:bootstrap] ran successfully\r\n[2013-07-17T20:05:35+00:00] INFO: Processing bash[emit provision complete] action run (cloudfoundry::vagrant-provision-end line 2)\r\n[2013-07-17T20:05:35+00:00] INFO: bash[emit provision complete] ran successfully\r\n[2013-07-17T20:05:35+00:00] INFO: Chef Run complete in 1332.027903781 seconds\r\n[2013-07-17T20:05:35+00:00] INFO: Running report handlers\r\n[2013-07-17T20:05:35+00:00] INFO: Report handlers complete\r\n<\/pre>\n<p>We can now log into our new EC2 instance, which is running Cloud Foundry v2:<\/p>\n<pre>\r\n$ vagrant ssh\r\n<\/pre>\n<p>Note: all commands that follow are intended to be run on the EC2 instance.<\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Push_an_app\"><\/span>Push an app<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>First, we must initialize the Cloud Foundry v2 command-line interface with the following command:<\/p>\n<pre>\r\n$ cd \/vagrant\r\n$ rake cf:init_cf_cli\r\n<\/pre>\n<p>Here is the output of that command:<\/p>\n<pre>\r\n==> Initializing cf CLI\r\nSetting target to http:\/\/127.0.0.1:8181... OK\r\ntarget: http:\/\/127.0.0.1:8181\r\n\r\nAuthenticating... OK\r\nThere are no spaces. You may want to create one with create-space.\r\nCreating organization myorg... OK\r\nSwitching to organization myorg... OK\r\nThere are no spaces. You may want to create one with create-space.\r\nCreating space myspace... OK\r\nAdding you as a manager... OK\r\nAdding you as a developer... OK\r\nSpace created! Use `cf switch-space myspace` to target it.\r\nSwitching to space myspace... OK\r\n\r\nTarget Information (where will apps be pushed):\r\n  CF instance: http:\/\/127.0.0.1:8181 (API version: 2)\r\n  user: admin\r\n  target app space: myspace (org: myorg)\r\n<\/pre>\n<p>Now you can deploy one of the test apps. We will use a Node.js &#8220;Hello World&#8221; app:<\/p>\n<pre>\r\n$ cd test-apps\/hello-node\r\n$ cf push\r\n<\/pre>\n<p>We see the output:<\/p>\n<pre>\r\nWarning: url is not a valid manifest attribute. Please remove this attribute from your manifest to get rid of this warning\r\nUsing manifest file manifest.yml\r\n\r\nCreating hello-node... OK\r\n\r\n1: hello-node\r\n2: none\r\nSubdomain> hello-node\r\n\r\n1: vcap.me\r\n2: none\r\nDomain> 1      \r\n\r\nCreating route hello-node.vcap.me... OK\r\nBinding hello-node.vcap.me to hello-node... OK\r\nUploading hello-node... OK\r\nPreparing to start hello-node... OK\r\nChecking status of app 'hello-node'...........................\r\n  0 of 1 instances running (1 starting)\r\n  0 of 1 instances running (1 starting)\r\n  1 of 1 instances running (1 running)\r\nPush successful! App 'hello-node' available at http:\/\/hello-node.vcap.me\r\n<\/pre>\n<p>Cloud Foundry v2 is running on localhost on our EC2 instance, so our app is not accessible from our web-browser, but we can test the app exists using curl from the EC2 instance:<\/p>\n<pre>\r\n$ curl http:\/\/hello-node.vcap.me\/\r\n<\/pre>\n<p>Here is what is output by curl:<\/p>\n<pre>\r\nHello from Cloud Foundry\r\n<\/pre>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Delete_the_app\"><\/span>Delete the app<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>To delete the app, you can use:<\/p>\n<pre>\r\n$ cf delete\r\n<\/pre>\n<p>The following output is seen:<\/p>\n<pre>\r\nWarning: url is not a valid manifest attribute. Please remove this attribute from your manifest to get rid of this warning\r\nUsing manifest file manifest.yml\r\n\r\nReally delete hello-node?> y\r\n\r\nDeleting hello-node... OK\r\n<\/pre>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Inside_out\"><\/span>Inside out<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><a href=\"http:\/\/xip.io\/\" rel=\"noopener noreferrer\" target=\"_blank\">xip.io<\/a><\/p>\n<p>From the notes I was given:<\/p>\n<p>Now, to expose apps externally, it gets trickier. First, you&#8217;ll need to provision an elastic IP in the AWS console and attach it to the EC2 instance that&#8217;s running the cf v2 install. Then, you&#8217;ll need to set up a wildcard DNS record to point to that IP (*.domain and domain should point to that IP). xip.io might work here, but I&#8217;m not familiar enough with it to know for sure.<\/p>\n<p>xip.io is actually perfect for this. All I need is my external IP, which was <code style=\"color: black; background-color: #e6e6e6;\">50.19.50.63<\/code>, and I append <code style=\"color: black; background-color: #e6e6e6;\">\".xip.io\"<\/code>, which gives me <code style=\"color: black; background-color: #e6e6e6;\">\"50.19.50.63.xip.io\"<\/code> as well as wildcard <code style=\"color: black; background-color: #e6e6e6;\">\"*.50.19.50.63.xip.io\"<\/code> for the Cloud Foundry API and any apps I deploy. This is a zero-configuration service. The IP that you want to resolve to is included in the hostname you create and the DNS service simply returns you the IP. This means you can have a valid globally resolvable DNS hostname instantly.<\/p>\n<p>I can also get a simpler hostname by checking the DNS record of this hostname, which is actually just a CNAME.<\/p>\n<pre>\r\n$ host 50.19.50.63.xip.io\r\n<\/pre>\n<p>Which outputs:<\/p>\n<pre>\r\n50.19.50.63.xip.io is an alias for hj8raq.xip.io.\r\nhj8raq.xip.io has address 50.19.50.63\r\nHost hj8raq.xip.io not found: 3(NXDOMAIN)\r\nHost hj8raq.xip.io not found: 3(NXDOMAIN)\r\n<\/pre>\n<p>So, I can use <code style=\"color: black; background-color: #e6e6e6;\">hj8raq.xip.io<\/code> instead, since it is shorter and I just want to use it temporarily.<\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Updating_more_config\"><\/span>Updating more config<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Since we now have an external domain name, not just localhost, we need to update some configuration files within the <code style=\"color: black; background-color: #e6e6e6;\">custom_config_files<\/code> directory.<\/p>\n<pre>\r\n$ cd \/vagrant\/custom_config_files\r\n<\/pre>\n<p>Assuming you are running under the domain <code style=\"color: black; background-color: #e6e6e6;\">\"yourdomain\"<\/code> (or <code style=\"color: black; background-color: #e6e6e6;\">\"hj8raq.xip.io\"<\/code> in my case), you should edit the <code style=\"color: black; background-color: #e6e6e6;\">cloud_controller.yml<\/code> as follows:<\/p>\n<pre>\r\n$ (cd cloud_controller_ng; vim cloud_controller.yml)\r\n<\/pre>\n<ul>\n<li> change <code style=\"color: black; background-color: #e6e6e6;\">external_domain<\/code> to <code style=\"color: black; background-color: #e6e6e6;\">api.yourdomain<\/code><\/li>\n<li> change <code style=\"color: black; background-color: #e6e6e6;\">system_domain<\/code> to <code style=\"color: black; background-color: #e6e6e6;\">yourdomain<\/code><\/li>\n<li> change <code style=\"color: black; background-color: #e6e6e6;\">app_domains<\/code> to <code style=\"color: black; background-color: #e6e6e6;\">yourdomain<\/code><\/li>\n<li> change <code style=\"color: black; background-color: #e6e6e6;\">uaa:url<\/code> to <code style=\"color: black; background-color: #e6e6e6;\">http:\/\/yourdomain:8080\/uaa<\/code><\/li>\n<\/ul>\n<p>Next, edit the DEA configuration.<\/p>\n<pre>\r\n$ (cd dea_ng; vim dea.yml)\r\n<\/pre>\n<ul>\n<li> change <code style=\"color: black; background-color: #e6e6e6;\">domain<\/code> to <code style=\"color: black; background-color: #e6e6e6;\">yourdomain<\/code><\/li>\n<\/ul>\n<p>And, finally, the configuration of the Health Manager:<\/p>\n<pre>\r\n$ (cd health_manager; vim health_manager.yml)\r\n<\/pre>\n<ul>\n<li> change <code style=\"color: black; background-color: #e6e6e6;\">bulk_api:host<\/code> to <code style=\"color: black; background-color: #e6e6e6;\">http:\/\/api.yourdomain:8181<\/code><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Router-registry_bug\"><\/span>Router-registry bug<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>There was a small bug on my AWS deployment that may have been fixed. This was related to a incompatibility with the JSON between the Cloud Controller and the Router when registering the API endpoint with the router. Here&#8217;s the fix:<\/p>\n<pre>\r\n$ cd \/vagrant\/cloud_controller_ng\/lib\/cloud_controller\r\n$ vim message_bus.rb\r\n<\/pre>\n<p>Then, change the line:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n:uris =&gt; config&#x5B;:external_domain],\r\n<\/pre>\n<p>To this:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n:uris =&gt; &#x5B;config&#x5B;:external_domain]],\r\n<\/pre>\n<p>This will make <code style=\"color: black; background-color: #e6e6e6;\">:uris<\/code> an array, not a string. Probably, better to fix this in the gorouter, but this is quicker for now.<\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Restart_CC_DB\"><\/span>Restart CC DB<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Now we need to reset the Cloud Controller database.<\/p>\n<pre>\r\n$ cd \/vagrant\/\r\n$ rake cf:bootstrap\r\n<\/pre>\n<p>Finally, reboot the machine.<\/p>\n<pre>\r\n$ sudo reboot\r\n<\/pre>\n<p>When the machine comes back up, we can <code style=\"color: black; background-color: #e6e6e6;\">ssh<\/code> back into it:<\/p>\n<pre>\r\n$ vagrant ssh\r\n<\/pre>\n<p>And run the <code style=\"color: black; background-color: #e6e6e6;\">.\/start.sh<\/code> command to start Cloud Foundry components.<\/p>\n<pre>\r\n$ cd \/vagrant\r\n$ .\/start.sh\r\n<\/pre>\n<p>Now, Cloud Foundry v2 should be running with your externally accessible endpoint.<\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Related_video\"><\/span>Related video<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><small>In this meetup session, Gast\u00f3n Ramos and Alan Mor\u00e1n of Altoros Argentina deliver an overview of Cloud Foundry and present CF Vagrant Installer to the audience.<\/small><\/p>\n<p><center><iframe loading=\"lazy\" width=\"560\" height=\"315\" src=\"https:\/\/www.youtube.com\/embed\/3P0_9r780n0\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe><\/center><\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Further_reading\"><\/span>Further reading<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ul>\n<li><a href=\"https:\/\/www.altoros.com\/blog\/cloud-foundry-vagrant-installer-now-supports-custom-buildpacks\/\" rel=\"noopener noreferrer\" target=\"_blank\">Cloud Foundry Vagrant Installer Now Supports Custom Buildpacks<\/a><\/li>\n<li><a href=\"https:\/\/www.altoros.com\/blog\/how-to-install-cloud-foundry-locally-by-using-vagrant\/\" rel=\"noopener noreferrer\" target=\"_blank\">How to Install Cloud Foundry Locally by Using Vagrant<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Recently, we published an article on the Cloud Foundry blog in which we explained how to install Cloud Foundry with Vagrant. Although BOSH is suggested as the official method of setting up a system, the way described in the article is easier and faster. This blog post found on the [&#8230;]<\/p>\n","protected":false},"author":65,"featured_media":45044,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"content-type":"","footnotes":"","_links_to":"","_links_to_target":""},"categories":[214],"tags":[873,206],"class_list":["post-44987","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-cloud-native","tag-oss-cloud-foundry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Deploy Cloud Foundry v2 to AWS by Using Vagrant | Altoros<\/title>\n<meta name=\"description\" content=\"Learn an easy and fast way to spin up a single instance of Cloud Foundry v2 on Amazon EC2, with suggestions on automating some installation tasks.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.altoros.com\/blog\/how-to-deploy-cloud-foundry-v2-to-aws-by-using-vagrant\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Deploy Cloud Foundry v2 to AWS by Using Vagrant | Altoros\" \/>\n<meta property=\"og:description\" content=\"Recently, we published an article on the Cloud Foundry blog in which we explained how to install Cloud Foundry with Vagrant. Although BOSH is suggested as the official method of setting up a system, the way described in the article is easier and faster. This blog post found on the [...]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.altoros.com\/blog\/how-to-deploy-cloud-foundry-v2-to-aws-by-using-vagrant\/\" \/>\n<meta property=\"og:site_name\" content=\"Altoros\" \/>\n<meta property=\"article:published_time\" content=\"2013-08-02T12:32:46+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-07-09T21:10:39+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2013\/08\/AWS-credentials-2.png\" \/>\n\t<meta property=\"og:image:width\" content=\"864\" \/>\n\t<meta property=\"og:image:height\" content=\"320\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Gast\u00f3n Ramos\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Gast\u00f3n Ramos\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"12 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.altoros.com\\\/blog\\\/how-to-deploy-cloud-foundry-v2-to-aws-by-using-vagrant\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.altoros.com\\\/blog\\\/how-to-deploy-cloud-foundry-v2-to-aws-by-using-vagrant\\\/\"},\"author\":{\"name\":\"Gast\u00f3n Ramos\",\"@id\":\"https:\\\/\\\/www.altoros.com\\\/blog\\\/#\\\/schema\\\/person\\\/3bfa3cc42526eb3e6a83df9d634e43f7\"},\"headline\":\"How to Deploy Cloud Foundry v2 to AWS by Using Vagrant\",\"datePublished\":\"2013-08-02T12:32:46+00:00\",\"dateModified\":\"2019-07-09T21:10:39+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.altoros.com\\\/blog\\\/how-to-deploy-cloud-foundry-v2-to-aws-by-using-vagrant\\\/\"},\"wordCount\":1201,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.altoros.com\\\/blog\\\/how-to-deploy-cloud-foundry-v2-to-aws-by-using-vagrant\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.altoros.com\\\/blog\\\/wp-content\\\/uploads\\\/2013\\\/08\\\/AWS-credentials-2.png\",\"keywords\":[\"Cloud-Native\",\"OSS Cloud Foundry\"],\"articleSection\":[\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.altoros.com\\\/blog\\\/how-to-deploy-cloud-foundry-v2-to-aws-by-using-vagrant\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.altoros.com\\\/blog\\\/how-to-deploy-cloud-foundry-v2-to-aws-by-using-vagrant\\\/\",\"url\":\"https:\\\/\\\/www.altoros.com\\\/blog\\\/how-to-deploy-cloud-foundry-v2-to-aws-by-using-vagrant\\\/\",\"name\":\"How to Deploy Cloud Foundry v2 to AWS by Using Vagrant | Altoros\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.altoros.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.altoros.com\\\/blog\\\/how-to-deploy-cloud-foundry-v2-to-aws-by-using-vagrant\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.altoros.com\\\/blog\\\/how-to-deploy-cloud-foundry-v2-to-aws-by-using-vagrant\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.altoros.com\\\/blog\\\/wp-content\\\/uploads\\\/2013\\\/08\\\/AWS-credentials-2.png\",\"datePublished\":\"2013-08-02T12:32:46+00:00\",\"dateModified\":\"2019-07-09T21:10:39+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.altoros.com\\\/blog\\\/#\\\/schema\\\/person\\\/3bfa3cc42526eb3e6a83df9d634e43f7\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.altoros.com\\\/blog\\\/how-to-deploy-cloud-foundry-v2-to-aws-by-using-vagrant\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.altoros.com\\\/blog\\\/how-to-deploy-cloud-foundry-v2-to-aws-by-using-vagrant\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.altoros.com\\\/blog\\\/how-to-deploy-cloud-foundry-v2-to-aws-by-using-vagrant\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.altoros.com\\\/blog\\\/wp-content\\\/uploads\\\/2013\\\/08\\\/AWS-credentials-2.png\",\"contentUrl\":\"https:\\\/\\\/www.altoros.com\\\/blog\\\/wp-content\\\/uploads\\\/2013\\\/08\\\/AWS-credentials-2.png\",\"width\":864,\"height\":320},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.altoros.com\\\/blog\\\/how-to-deploy-cloud-foundry-v2-to-aws-by-using-vagrant\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.altoros.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Deploy Cloud Foundry v2 to AWS by Using Vagrant\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.altoros.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.altoros.com\\\/blog\\\/\",\"name\":\"Altoros\",\"description\":\"Insight\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.altoros.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.altoros.com\\\/blog\\\/#\\\/schema\\\/person\\\/3bfa3cc42526eb3e6a83df9d634e43f7\",\"name\":\"Gast\u00f3n Ramos\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/85463eb4f2e4baa47ff7b07e41111397f7bb0edb3dbeb78985e2e7a2ff07a0ac?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/85463eb4f2e4baa47ff7b07e41111397f7bb0edb3dbeb78985e2e7a2ff07a0ac?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/85463eb4f2e4baa47ff7b07e41111397f7bb0edb3dbeb78985e2e7a2ff07a0ac?s=96&d=mm&r=g\",\"caption\":\"Gast\u00f3n Ramos\"},\"description\":\"Gaston Ramos is a software engineer at Altoros. He specializes in Ruby on Rails as well as the Rack, Cuba, and Sinatra frameworks. Gaston started using Ruby in 2005. Since then, he enjoys a simple and clear style for writing software.\",\"url\":\"https:\\\/\\\/www.altoros.com\\\/blog\\\/author\\\/gaston-ramos\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Deploy Cloud Foundry v2 to AWS by Using Vagrant | Altoros","description":"Learn an easy and fast way to spin up a single instance of Cloud Foundry v2 on Amazon EC2, with suggestions on automating some installation tasks.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.altoros.com\/blog\/how-to-deploy-cloud-foundry-v2-to-aws-by-using-vagrant\/","og_locale":"en_US","og_type":"article","og_title":"How to Deploy Cloud Foundry v2 to AWS by Using Vagrant | Altoros","og_description":"Recently, we published an article on the Cloud Foundry blog in which we explained how to install Cloud Foundry with Vagrant. Although BOSH is suggested as the official method of setting up a system, the way described in the article is easier and faster. This blog post found on the [...]","og_url":"https:\/\/www.altoros.com\/blog\/how-to-deploy-cloud-foundry-v2-to-aws-by-using-vagrant\/","og_site_name":"Altoros","article_published_time":"2013-08-02T12:32:46+00:00","article_modified_time":"2019-07-09T21:10:39+00:00","og_image":[{"width":864,"height":320,"url":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2013\/08\/AWS-credentials-2.png","type":"image\/png"}],"author":"Gast\u00f3n Ramos","twitter_misc":{"Written by":"Gast\u00f3n Ramos","Est. reading time":"12 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.altoros.com\/blog\/how-to-deploy-cloud-foundry-v2-to-aws-by-using-vagrant\/#article","isPartOf":{"@id":"https:\/\/www.altoros.com\/blog\/how-to-deploy-cloud-foundry-v2-to-aws-by-using-vagrant\/"},"author":{"name":"Gast\u00f3n Ramos","@id":"https:\/\/www.altoros.com\/blog\/#\/schema\/person\/3bfa3cc42526eb3e6a83df9d634e43f7"},"headline":"How to Deploy Cloud Foundry v2 to AWS by Using Vagrant","datePublished":"2013-08-02T12:32:46+00:00","dateModified":"2019-07-09T21:10:39+00:00","mainEntityOfPage":{"@id":"https:\/\/www.altoros.com\/blog\/how-to-deploy-cloud-foundry-v2-to-aws-by-using-vagrant\/"},"wordCount":1201,"commentCount":0,"image":{"@id":"https:\/\/www.altoros.com\/blog\/how-to-deploy-cloud-foundry-v2-to-aws-by-using-vagrant\/#primaryimage"},"thumbnailUrl":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2013\/08\/AWS-credentials-2.png","keywords":["Cloud-Native","OSS Cloud Foundry"],"articleSection":["Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.altoros.com\/blog\/how-to-deploy-cloud-foundry-v2-to-aws-by-using-vagrant\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.altoros.com\/blog\/how-to-deploy-cloud-foundry-v2-to-aws-by-using-vagrant\/","url":"https:\/\/www.altoros.com\/blog\/how-to-deploy-cloud-foundry-v2-to-aws-by-using-vagrant\/","name":"How to Deploy Cloud Foundry v2 to AWS by Using Vagrant | Altoros","isPartOf":{"@id":"https:\/\/www.altoros.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.altoros.com\/blog\/how-to-deploy-cloud-foundry-v2-to-aws-by-using-vagrant\/#primaryimage"},"image":{"@id":"https:\/\/www.altoros.com\/blog\/how-to-deploy-cloud-foundry-v2-to-aws-by-using-vagrant\/#primaryimage"},"thumbnailUrl":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2013\/08\/AWS-credentials-2.png","datePublished":"2013-08-02T12:32:46+00:00","dateModified":"2019-07-09T21:10:39+00:00","author":{"@id":"https:\/\/www.altoros.com\/blog\/#\/schema\/person\/3bfa3cc42526eb3e6a83df9d634e43f7"},"breadcrumb":{"@id":"https:\/\/www.altoros.com\/blog\/how-to-deploy-cloud-foundry-v2-to-aws-by-using-vagrant\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.altoros.com\/blog\/how-to-deploy-cloud-foundry-v2-to-aws-by-using-vagrant\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.altoros.com\/blog\/how-to-deploy-cloud-foundry-v2-to-aws-by-using-vagrant\/#primaryimage","url":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2013\/08\/AWS-credentials-2.png","contentUrl":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2013\/08\/AWS-credentials-2.png","width":864,"height":320},{"@type":"BreadcrumbList","@id":"https:\/\/www.altoros.com\/blog\/how-to-deploy-cloud-foundry-v2-to-aws-by-using-vagrant\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.altoros.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Deploy Cloud Foundry v2 to AWS by Using Vagrant"}]},{"@type":"WebSite","@id":"https:\/\/www.altoros.com\/blog\/#website","url":"https:\/\/www.altoros.com\/blog\/","name":"Altoros","description":"Insight","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.altoros.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.altoros.com\/blog\/#\/schema\/person\/3bfa3cc42526eb3e6a83df9d634e43f7","name":"Gast\u00f3n Ramos","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/85463eb4f2e4baa47ff7b07e41111397f7bb0edb3dbeb78985e2e7a2ff07a0ac?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/85463eb4f2e4baa47ff7b07e41111397f7bb0edb3dbeb78985e2e7a2ff07a0ac?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/85463eb4f2e4baa47ff7b07e41111397f7bb0edb3dbeb78985e2e7a2ff07a0ac?s=96&d=mm&r=g","caption":"Gast\u00f3n Ramos"},"description":"Gaston Ramos is a software engineer at Altoros. He specializes in Ruby on Rails as well as the Rack, Cuba, and Sinatra frameworks. Gaston started using Ruby in 2005. Since then, he enjoys a simple and clear style for writing software.","url":"https:\/\/www.altoros.com\/blog\/author\/gaston-ramos\/"}]}},"_links":{"self":[{"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/posts\/44987","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/users\/65"}],"replies":[{"embeddable":true,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/comments?post=44987"}],"version-history":[{"count":34,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/posts\/44987\/revisions"}],"predecessor-version":[{"id":45008,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/posts\/44987\/revisions\/45008"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/media\/45044"}],"wp:attachment":[{"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/media?parent=44987"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/categories?post=44987"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/tags?post=44987"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}