Skip to content

Instantly share code, notes, and snippets.

@chewmanfoo
chewmanfoo / cf_deployment.rb
Last active December 14, 2017 15:06
cf_deployment.rb
# app/models/cf_deployment.rb
# env:string, account:string, delay:string, deploy_at:datetime, revision:string, branch:string, tag:string
class CfDeployment < ApplicationRecord
WORKPATH = "/tmp/plp1"
progname = "app/models/cf_deployment.rb"
# model association
belongs_to :cf_template
belongs_to :creator, :class_name => 'User'
#has_one :qk_deployment
#...
def cf_deployment_params
params.permit(:env, :account, :delay, :deploy_at, :cf_template_id, :dry_run, cf_deployment:[:env, :account])
end
#...
tomcat::war { "MyAPI.war":
catalina_base => "/opt/tomcat/",
war_source => "${war_src}/MyAPI-${war_version}.war",
} ->
C02Q22P4G8WL:docker sg0218049$ docker build --build-arg HTTP_PROXY=$http_proxy --build-arg HTTPS_PROXY=$https_proxy --rm --no-cache -t local/spark-site .
Sending build context to Docker daemon 88.06 kB
Step 1 : FROM captinkraken/nginx-jekyll-nodejs:updated-npm
Pulling repository docker.io/captinkraken/nginx-jekyll-nodejs
Network timed out while trying to connect to https://index.docker.io/v1/repositories/captinkraken/nginx-jekyll-nodejs/images. You may want to check your internet connection or if you are behind a proxy.
C02Q22P4G8WL:docker sg0218049$ docker run -itd --name=container1 busybox
Unable to find image 'busybox:latest' locally
Pulling repository docker.io/library/busybox
docker: Network timed out while trying to connect to https://index.docker.io/v1/repositories/library/busybox/images. You may want to check your internet connection or if you are behind a proxy..
See 'docker run --help'.
C02Q22P4G8WL:docker sg0218049$ wget https://index.docker.io/v1/repositories/library/busybox/images
--2016-12-09 14:18:33-- https://index.docker.io/v1/repositories/library/busybox/images
Resolving www-ad-proxy.sabre.com... 151.193.220.27, 151.193.220.28, 151.193.220.29
Connecting to www-ad-proxy.sabre.com|151.193.220.27|:80... connected.
Proxy request sent, awaiting response... 200 OK
Running from: /usr/lib/jenkins/jenkins.war
Aug 06, 2016 10:43:06 PM org.eclipse.jetty.util.log.JavaUtilLog info
INFO: Logging initialized @753ms
Aug 06, 2016 10:43:06 PM winstone.Logger logInternal
INFO: Beginning extraction from war file
Aug 06, 2016 10:43:06 PM org.eclipse.jetty.util.log.JavaUtilLog warn
WARNING: Empty contextPath
Using one-time self-signed certificate
Aug 06, 2016 10:43:06 PM winstone.Logger logInternal
INFO: Winstone shutdown successfully
---
Corporate IT:
Rotation:
- End Date: 8/3/2016
Primary: Daniel Lydick
Secondary: James Sullivan
- End Date: 8/10/2016
Primary: Lewis Everly
Secondary: Manuel Bermudez
- End Date: 8/17/2016
╰─$ ssh -vvv [email protected] 130 ↵
OpenSSH_6.9p1, LibreSSL 2.1.8
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to 192.168.1.183 [192.168.1.183] port 22.
debug1: Connection established.
debug1: identity file /Users/jason/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/jason/.ssh/id_rsa-cert type -1
[~]$ ssh -vvv [email protected] rbenv:system
OpenSSH_6.9p1, LibreSSL 2.1.8
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to 192.168.1.183 [192.168.1.183] port 22.
debug1: Connection established.
debug1: identity file /Users/jason/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/jason/.ssh/id_rsa-cert type -1
jenkins@cit-c-jenk001:~$ irb
/usr/local/rbenv/versions/2.2.3/lib/ruby/2.2.0/rubygems/stub_specification.rb:75:in `initialize': Permission denied @ rb_sysopen - /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/specifications/phantomjs-2.1.1.0.gemspec (Errno::EACCES)
from /usr/local/rbenv/versions/2.2.3/lib/ruby/2.2.0/rubygems/stub_specification.rb:75:in `open'
from /usr/local/rbenv/versions/2.2.3/lib/ruby/2.2.0/rubygems/stub_specification.rb:75:in `data'
from /usr/local/rbenv/versions/2.2.3/lib/ruby/2.2.0/rubygems/stub_specification.rb:178:in `valid?'
from /usr/local/rbenv/versions/2.2.3/lib/ruby/2.2.0/rubygems/specification.rb:731:in `block in each_stub'
from /usr/local/rbenv/versions/2.2.3/lib/ruby/2.2.0/rubygems/specification.rb:723:in `block (2 levels) in each_gemspec'
from /usr/local/rbenv/versions/2.2.3/lib/ruby/2.2.0/rubygems/specification.rb:722:in `each'
from /usr/local/rbenv/versions/2.2.3/lib/ruby/2.2.0/rubygems/specification.rb:722:in `block in each_gemspec'
from /usr/local/rbenv/version