@@ -20,34 +20,34 @@ printf "gem 'kuby-sidekiq', '~> 0.3'\n" >> Gemfile
2020printf " gem 'sidekiq', '~> 6.5'\n" >> Gemfile
2121
2222# install ruby deps
23- bundle install --jobs 2 --retry 3
24-
25- # bundle lock
26- # cat <<'EOF' > .prebundle_config
27- # Prebundler.configure do |config|
28- # config.storage_backend = Prebundler::S3Backend .new(
29- # client: Aws::S3::Client.new(
30- # region: 'default',
31- # credentials: Aws::Credentials.new(
32- # ENV['PREBUNDLER_ACCESS_KEY_ID'],
33- # ENV['PREBUNDLER_SECRET_ACCESS_KEY']
34- # ) ,
35- # endpoint: 'https://us-east-1.linodeobjects.com',
36- # http_continue_timeout: 0
37- # ) ,
38- # bucket : 'prebundler2',
39- # region: 'us-east-1'
40- # )
41- # end
42- # EOF
43- # prebundle install --jobs 2 --retry 3 --no-binstubs
23+ bundle lock
24+
25+ cat << ' EOF ' > .prebundle_config
26+ Prebundler.configure do |config|
27+ config.storage_backend = Prebundler::S3Backend.new(
28+ client: Aws::S3::Client .new(
29+ region: 'default',
30+ credentials: Aws::Credentials.new(
31+ ENV['PREBUNDLER_ACCESS_KEY_ID'],
32+ ENV['PREBUNDLER_SECRET_ACCESS_KEY']
33+ ),
34+ endpoint: 'https://us-east-1.linodeobjects.com' ,
35+ http_continue_timeout: 0
36+ ),
37+ bucket: 'prebundler2' ,
38+ region : 'us-east-1'
39+ )
40+ end
41+ EOF
42+
43+ prebundle install --jobs 2 --retry 3 --no-binstubs
4444
4545# javascript deps, cxx flags because node-sass is a special snowflake
4646CXXFLAGS=" --std=c++17" yarn install
4747
4848# bootstrap app for use with kuby
4949bundle exec bin/rails g kuby
50- bundle install --jobs 2 --retry 3
50+
5151cat << EOF > kuby.rb
5252class VendorPhase < Kuby::Docker::Layer
5353 def apply_to(dockerfile)
5757
5858require 'kuby/kind'
5959require 'kuby/sidekiq'
60- # require 'kuby/prebundler'
60+ require 'kuby/prebundler'
6161require 'active_support/core_ext'
6262require 'active_support/encrypted_configuration'
6363
@@ -85,7 +85,7 @@ Kuby.define('Kubytest') do
8585 end
8686
8787 kubernetes do
88- # add_plugin :prebundler
88+ add_plugin :prebundler
8989
9090 add_plugin :rails_app do
9191 tls_enabled true
@@ -249,20 +249,20 @@ $kubectl -n kubytest-production get secret kubytest-tls -o json \
249249 | base64 -d - \
250250 | openssl verify -CAfile pebble.root.crt -untrusted pebble.intermediate.crt
251251
252- # # attempt to hit the app
253- # curl -vvv https://kubytest.io \
254- # --resolve kubytest.io:443:127.0.0.1 \
255- # --cacert pebble.root.crt \
256- # --fail \
257- # --connect-timeout 5 \
258- # --max-time 10 \
259- # --retry 10 \
260- # --retry-delay 10
261-
262- # # insert job
263- # GLI_DEBUG=true bundle exec kuby -e production remote exec \
264- # "bundle exec rails runner 'w = Widget.create(status: \"pending\"); WidgetsJob.perform_async(w.id)'"
265-
266- # GLI_DEBUG=true bundle exec kuby -e production remote exec \
267- # "bundle exec rails runner 'w = Widget.first; puts w.status'" \
268- # | grep 'processed'
252+ # attempt to hit the app
253+ curl -vvv https://kubytest.io \
254+ --resolve kubytest.io:443:127.0.0.1 \
255+ --cacert pebble.root.crt \
256+ --fail \
257+ --connect-timeout 5 \
258+ --max-time 10 \
259+ --retry 10 \
260+ --retry-delay 10
261+
262+ # insert job
263+ GLI_DEBUG=true bundle exec kuby -e production remote exec \
264+ " bundle exec rails runner 'w = Widget.create(status: \" pending\" ); WidgetsJob.perform_async(w.id)'"
265+
266+ GLI_DEBUG=true bundle exec kuby -e production remote exec \
267+ " bundle exec rails runner 'w = Widget.first; puts w.status'" \
268+ | grep ' processed'
0 commit comments