Skip to content

Instantly share code, notes, and snippets.

@christiangenco
Created December 28, 2015 20:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save christiangenco/c3d84119bf7c594b7bd6 to your computer and use it in GitHub Desktop.
Save christiangenco/c3d84119bf7c594b7bd6 to your computer and use it in GitHub Desktop.
How can I speed up Rails Docker deployments on Google Cloud Platform?
$ gcloud preview app deploy app.yaml worker.yaml --promote
You are about to deploy the following modules:
- dbinbox-1172/default (from [/Users/cgenco/Desktop/6-task-queueing/app.yaml])
Deployed URL: [https://dbinbox-1172.appspot.com]
- dbinbox-1172/worker (from [/Users/cgenco/Desktop/6-task-queueing/worker.yaml])
Deployed URL: [https://worker-dot-dbinbox-1172.appspot.com]
Do you want to continue (Y/n)? Y
Beginning deployment...
Verifying that Managed VMs are enabled and ready.
Provisioning remote build service.
Copying certificates for secure access. You may be prompted to create an SSH keypair.
Building and pushing image for module [default]
---------------------------------------- DOCKER BUILD OUTPUT ----------------------------------------
Step 0 : FROM gcr.io/google_appengine/ruby
---> 3e8b286df835
Step 1 : RUN rbenv install -s 2.2.3 && rbenv global 2.2.3 && gem install -q --no-rdoc --no-ri bundler --version 1.10.6 && gem install -q --no-rdoc --no-ri foreman --version 0.78.0
---> Running in aa26b63efd01
Successfully installed bundler-1.10.6
1 gem installed
Successfully installed foreman-0.78.0
1 gem installed
---> 01034d177f7a
Removing intermediate container aa26b63efd01
Step 2 : ENV RBENV_VERSION 2.2.3
---> Running in bd331ceecdc6
---> ac74446c124f
Removing intermediate container bd331ceecdc6
Step 3 : COPY Gemfile Gemfile.lock /app/
---> ca7182a73c07
Removing intermediate container 2885e114e532
Step 4 : RUN bundle install && rbenv rehash
---> Running in b20d6051b15f
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
Fetching gem metadata from https://rubygems.org/
.
.
.
.
.
.
.
.
.
Fetching version metadata from https://rubygems.org/
.
.
.
Fetching dependency metadata from https://rubygems.org/
.
.
Using rake 10.4.2
Installing CFPropertyList 2.3.2
Installing i18n 0.7.0
Installing json 1.8.3 with native extensions
Installing minitest 5.8.1
Installing thread_safe 0.3.5
Installing tzinfo 1.2.2
Installing activesupport 4.2.4
Installing builder 3.2.2
Installing erubis 2.7.0
Installing mini_portile 0.6.2
Installing nokogiri 1.6.6.2 with native extensions
Installing rails-deprecated_sanitizer 1.0.3
Installing rails-dom-testing 1.0.7
Installing loofah 2.0.3
Installing rails-html-sanitizer 1.0.2
Installing actionview 4.2.4
Installing rack 1.6.4
Installing rack-test 0.6.3
Installing actionpack 4.2.4
Installing globalid 0.3.6
Installing activejob 4.2.4
Installing mime-types 2.6.2
Installing mail 2.6.3
Installing actionmailer 4.2.4
Installing activemodel 4.2.4
Installing arel 6.0.3
Installing activerecord 4.2.4
Installing addressable 2.3.8
Installing extlib 0.9.16
Installing multi_json 1.11.2
Installing autoparse 0.3.3
Installing beefcake 1.1.0
Installing xpath 2.0.0
Installing capybara 2.5.0
Installing diff-lcs 1.2.5
Installing digest-crc 0.4.1
Installing excon 0.45.4
Installing multipart-post 2.0.0
Installing faraday 0.9.2
Installing fission 0.5.0
Installing formatador 0.2.5
Installing net-ssh 3.0.1
Installing net-scp 1.2.1
Installing fog-core 1.32.1
Installing fog-xml 0.1.2
Installing fog-atmos 0.1.0
Installing fog-json 1.0.2
Installing ipaddress 0.8.0
Installing fog-aws 0.7.6
Installing inflecto 0.0.2
Installing fog-brightbox 0.9.0
Installing fog-dynect 0.0.2
Installing fog-ecloud 0.3.0
Installing fog-google 0.1.1
Installing fog-local 0.2.1
Installing fog-powerdns 0.1.1
Installing fog-profitbricks 0.0.5
Installing fog-radosgw 0.0.4
Installing fog-riakcs 0.1.0
Installing fog-sakuracloud 1.3.3
Installing fog-serverlove 0.1.2
Installing fog-softlayer 1.0.0
Installing fog-storm_on_demand 0.1.1
Installing fog-terremark 0.1.0
Installing fog-vmfusion 0.1.0
Installing fog-voxel 0.1.0
Installing fog 1.34.0
Using thor 0.19.1
Using foreman 0.78.0
Installing jwt 1.5.1
Installing little-plugger 1.1.4
Installing logging 2.0.0
Installing memoist 0.12.0
Installing signet 0.6.1
Installing googleauth 0.4.2
Installing launchy 2.4.3
Installing retriable 1.4.1
Installing google-api-client 0.8.6
Installing zonefile 1.04
Installing gcloud 0.4.0
Installing hashie 3.4.2
Installing railties 4.2.4
Installing jquery-rails 4.0.5
Installing multi_xml 0.5.5
Installing mysql2 0.3.20 with native extensions
Installing oauth2 1.0.0
Installing omniauth 1.2.2
Installing omniauth-oauth2 1.3.1
Installing omniauth-google-oauth2 0.2.8
Using bundler 1.10.6
Installing sprockets 3.4.0
Installing sprockets-rails 2.3.3
Installing rails 4.2.4
Installing rspec-support 3.3.0
Installing rspec-core 3.3.2
Installing rspec-expectations 3.3.1
Installing rspec-mocks 3.3.2
Installing rspec-rails 3.3.3
Installing sqlite3 1.3.11 with native extensions
Bundle complete! 13 Gemfile dependencies, 100 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.
---> defe4a645182
Removing intermediate container b20d6051b15f
Step 5 : COPY . /app/
---> e55621a5fd17
Removing intermediate container 1823d64f4924
Step 6 : ENTRYPOINT bundle exec foreman start --formation "$FORMATION"
---> Running in 1b034bc566c1
---> eec857e47dcd
Removing intermediate container 1b034bc566c1
Successfully built eec857e47dcd
-----------------------------------------------------------------------------------------------------
Building and pushing image for module [worker]
---------------------------------------- DOCKER BUILD OUTPUT ----------------------------------------
Step 0 : FROM gcr.io/google_appengine/ruby
---> 3e8b286df835
Step 1 : RUN rbenv install -s 2.2.3 && rbenv global 2.2.3 && gem install -q --no-rdoc --no-ri bundler --version 1.10.6 && gem install -q --no-rdoc --no-ri foreman --version 0.78.0
---> Using cache
---> 01034d177f7a
Step 2 : ENV RBENV_VERSION 2.2.3
---> Using cache
---> ac74446c124f
Step 3 : COPY Gemfile Gemfile.lock /app/
---> Using cache
---> ca7182a73c07
Step 4 : RUN bundle install && rbenv rehash
---> Using cache
---> defe4a645182
Step 5 : COPY . /app/
---> Using cache
---> e55621a5fd17
Step 6 : ENTRYPOINT bundle exec foreman start --formation "$FORMATION"
---> Using cache
---> eec857e47dcd
Successfully built eec857e47dcd
-----------------------------------------------------------------------------------------------------
Beginning teardown of remote build environment (this may take a few seconds).
Updating module [default]...\Deleted [https://www.googleapis.com/compute/v1/projects/dbinbox-1172/zones/us-central1-f/instances/gae-builder-vm-20151228t134315].
Updating module [default]...done.
Updating module [worker]...done.
Deployed module [default] to [https://dbinbox-1172.appspot.com]
Deployed module [worker] to [https://worker-dot-dbinbox-1172.appspot.com]
$ gcloud preview app deploy app.yaml worker.yaml --promote
You are about to deploy the following modules:
- dbinbox-1172/default (from [/Users/cgenco/Desktop/6-task-queueing/app.yaml])
Deployed URL: [https://dbinbox-1172.appspot.com]
- dbinbox-1172/worker (from [/Users/cgenco/Desktop/6-task-queueing/worker.yaml])
Deployed URL: [https://worker-dot-dbinbox-1172.appspot.com]
Do you want to continue (Y/n)? Y
Beginning deployment...
Verifying that Managed VMs are enabled and ready.
Provisioning remote build service.
Copying certificates for secure access. You may be prompted to create an SSH keypair.
Building and pushing image for module [default]
---------------------------------------- DOCKER BUILD OUTPUT ----------------------------------------
Step 0 : FROM gcr.io/google_appengine/ruby
---> 3e8b286df835
Step 1 : RUN rbenv install -s 2.2.3 && rbenv global 2.2.3 && gem install -q --no-rdoc --no-ri bundler --version 1.10.6 && gem install -q --no-rdoc --no-ri foreman --version 0.78.0
---> Running in ea6bd5b097cc
Successfully installed bundler-1.10.6
1 gem installed
Successfully installed foreman-0.78.0
1 gem installed
---> efdafde40bf8
Removing intermediate container ea6bd5b097cc
Step 2 : ENV RBENV_VERSION 2.2.3
---> Running in 9cdcb0a9bee0
---> 49534db5b7eb
Removing intermediate container 9cdcb0a9bee0
Step 3 : COPY Gemfile Gemfile.lock /app/
---> d8c2f1c5a44b
Removing intermediate container 09be6f3c1590
Step 4 : RUN bundle install && rbenv rehash
---> Running in f8ae36a977ab
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
Fetching gem metadata from https://rubygems.org/
.
.
.
.
.
.
.
.
.
Fetching version metadata from https://rubygems.org/
.
.
.
Fetching dependency metadata from https://rubygems.org/
.
.
Using rake 10.4.2
Installing CFPropertyList 2.3.2
Installing i18n 0.7.0
Installing json 1.8.3 with native extensions
Installing minitest 5.8.1
Installing thread_safe 0.3.5
Installing tzinfo 1.2.2
Installing activesupport 4.2.4
Installing builder 3.2.2
Installing erubis 2.7.0
Installing mini_portile 0.6.2
Installing nokogiri 1.6.6.2 with native extensions
Installing rails-deprecated_sanitizer 1.0.3
Installing rails-dom-testing 1.0.7
Installing loofah 2.0.3
Installing rails-html-sanitizer 1.0.2
Installing actionview 4.2.4
Installing rack 1.6.4
Installing rack-test 0.6.3
Installing actionpack 4.2.4
Installing globalid 0.3.6
Installing activejob 4.2.4
Installing mime-types 2.6.2
Installing mail 2.6.3
Installing actionmailer 4.2.4
Installing activemodel 4.2.4
Installing arel 6.0.3
Installing activerecord 4.2.4
Installing addressable 2.3.8
Installing extlib 0.9.16
Installing multi_json 1.11.2
Installing autoparse 0.3.3
Installing beefcake 1.1.0
Installing xpath 2.0.0
Installing capybara 2.5.0
Installing diff-lcs 1.2.5
Installing digest-crc 0.4.1
Installing excon 0.45.4
Installing multipart-post 2.0.0
Installing faraday 0.9.2
Installing fission 0.5.0
Installing formatador 0.2.5
Installing net-ssh 3.0.1
Installing net-scp 1.2.1
Installing fog-core 1.32.1
Installing fog-xml 0.1.2
Installing fog-atmos 0.1.0
Installing fog-json 1.0.2
Installing ipaddress 0.8.0
Installing fog-aws 0.7.6
Installing inflecto 0.0.2
Installing fog-brightbox 0.9.0
Installing fog-dynect 0.0.2
Installing fog-ecloud 0.3.0
Installing fog-google 0.1.1
Installing fog-local 0.2.1
Installing fog-powerdns 0.1.1
Installing fog-profitbricks 0.0.5
Installing fog-radosgw 0.0.4
Installing fog-riakcs 0.1.0
Installing fog-sakuracloud 1.3.3
Installing fog-serverlove 0.1.2
Installing fog-softlayer 1.0.0
Installing fog-storm_on_demand 0.1.1
Installing fog-terremark 0.1.0
Installing fog-vmfusion 0.1.0
Installing fog-voxel 0.1.0
Installing fog 1.34.0
Using thor 0.19.1
Using foreman 0.78.0
Installing jwt 1.5.1
Installing little-plugger 1.1.4
Installing logging 2.0.0
Installing memoist 0.12.0
Installing signet 0.6.1
Installing googleauth 0.4.2
Installing launchy 2.4.3
Installing retriable 1.4.1
Installing google-api-client 0.8.6
Installing zonefile 1.04
Installing gcloud 0.4.0
Installing hashie 3.4.2
Installing railties 4.2.4
Installing jquery-rails 4.0.5
Installing multi_xml 0.5.5
Installing mysql2 0.3.20 with native extensions
Installing oauth2 1.0.0
Installing omniauth 1.2.2
Installing omniauth-oauth2 1.3.1
Installing omniauth-google-oauth2 0.2.8
Using bundler 1.10.6
Installing sprockets 3.4.0
Installing sprockets-rails 2.3.3
Installing rails 4.2.4
Installing rspec-support 3.3.0
Installing rspec-core 3.3.2
Installing rspec-expectations 3.3.1
Installing rspec-mocks 3.3.2
Installing rspec-rails 3.3.3
Installing sqlite3 1.3.11 with native extensions
Bundle complete! 13 Gemfile dependencies, 100 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.
---> d9f9b57ccbad
Removing intermediate container f8ae36a977ab
Step 5 : COPY . /app/
---> 503904327f13
Removing intermediate container 85735ffd29b6
Step 6 : ENTRYPOINT bundle exec foreman start --formation "$FORMATION"
---> Running in 03870d3764f0
---> af547f521411
Removing intermediate container 03870d3764f0
Successfully built af547f521411
-----------------------------------------------------------------------------------------------------
Building and pushing image for module [worker]
---------------------------------------- DOCKER BUILD OUTPUT ----------------------------------------
Step 0 : FROM gcr.io/google_appengine/ruby
---> 3e8b286df835
Step 1 : RUN rbenv install -s 2.2.3 && rbenv global 2.2.3 && gem install -q --no-rdoc --no-ri bundler --version 1.10.6 && gem install -q --no-rdoc --no-ri foreman --version 0.78.0
---> Using cache
---> efdafde40bf8
Step 2 : ENV RBENV_VERSION 2.2.3
---> Using cache
---> 49534db5b7eb
Step 3 : COPY Gemfile Gemfile.lock /app/
---> Using cache
---> d8c2f1c5a44b
Step 4 : RUN bundle install && rbenv rehash
---> Using cache
---> d9f9b57ccbad
Step 5 : COPY . /app/
---> Using cache
---> 503904327f13
Step 6 : ENTRYPOINT bundle exec foreman start --formation "$FORMATION"
---> Using cache
---> af547f521411
Successfully built af547f521411
-----------------------------------------------------------------------------------------------------
Beginning teardown of remote build environment (this may take a few seconds).
Updating module [default].../Deleted [https://www.googleapis.com/compute/v1/projects/dbinbox-1172/zones/us-central1-f/instances/gae-builder-vm-20151228t135905].
Updating module [default]...done.
Updating module [worker]...done.
Deployed module [default] to [https://dbinbox-1172.appspot.com]
Deployed module [worker] to [https://worker-dot-dbinbox-1172.appspot.com]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment