sonic-screwdriver 1.4.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/bin/commit_docs.sh +26 -0
- data/.circleci/config.yml +70 -0
- data/.gitignore +1 -1
- data/.ruby-version +1 -0
- data/CHANGELOG.md +13 -2
- data/Gemfile +3 -3
- data/Gemfile.lock +43 -14
- data/Guardfile +17 -10
- data/LICENSE.txt +2 -2
- data/README.md +10 -10
- data/Rakefile +9 -2
- data/docs/_config.yml +3 -0
- data/docs/_docs/help.md +1 -1
- data/docs/_docs/install-bastion.md +5 -15
- data/docs/_docs/install.md +3 -3
- data/docs/_docs/settings.md +40 -56
- data/docs/_docs/tutorial-ecs-exec.md +16 -20
- data/docs/_docs/tutorial-ecs-sh.md +73 -0
- data/docs/_docs/tutorial-execute.md +93 -17
- data/docs/_docs/tutorial-ssh.md +13 -18
- data/docs/_docs/why-ec2-run-command.md +1 -1
- data/docs/_includes/commands.html +5 -5
- data/docs/_includes/content.html +5 -0
- data/docs/_includes/css/main.css +15 -9
- data/docs/_includes/css/sonic.css +7 -5
- data/docs/_includes/example.html +4 -4
- data/docs/_includes/reference.md +1 -0
- data/docs/_includes/subnav.html +2 -1
- data/docs/_reference/sonic-completion.md +44 -0
- data/docs/_reference/sonic-completion_script.md +25 -0
- data/docs/_reference/sonic-ecs-exec.md +30 -0
- data/docs/_reference/sonic-ecs-help.md +21 -0
- data/docs/_reference/sonic-ecs-sh.md +35 -0
- data/docs/_reference/sonic-ecs.md +25 -0
- data/docs/_reference/sonic-execute.md +84 -0
- data/docs/_reference/sonic-list.md +40 -0
- data/docs/_reference/sonic-ssh.md +86 -0
- data/docs/_reference/sonic-version.md +21 -0
- data/docs/img/tutorials/ec2-console-run-command.png +0 -0
- data/docs/quick-start.md +9 -10
- data/docs/reference.md +12 -0
- data/{bin → exe}/sonic +3 -3
- data/lib/bash_scripts/docker-exec.sh +1 -0
- data/lib/bash_scripts/docker-run.sh +8 -1
- data/lib/sonic.rb +10 -2
- data/lib/sonic/{aws_services.rb → aws_service.rb} +6 -1
- data/lib/sonic/base_command.rb +82 -0
- data/lib/sonic/cli.rb +37 -27
- data/lib/sonic/command.rb +8 -22
- data/lib/sonic/completer.rb +161 -0
- data/lib/sonic/completer/script.rb +6 -0
- data/lib/sonic/completer/script.sh +10 -0
- data/lib/sonic/core.rb +15 -0
- data/lib/sonic/default/settings.yml +6 -16
- data/lib/sonic/docker.rb +29 -1
- data/lib/sonic/ecs.rb +22 -0
- data/lib/sonic/execute.rb +153 -18
- data/lib/sonic/help.rb +9 -0
- data/lib/sonic/help/command/send.md +10 -0
- data/lib/sonic/help/completion.md +22 -0
- data/lib/sonic/help/completion_script.md +3 -0
- data/lib/sonic/help/ecs/exec.md +8 -0
- data/lib/sonic/help/ecs/sh.md +13 -0
- data/lib/sonic/help/execute.md +60 -0
- data/lib/sonic/help/list.md +17 -0
- data/lib/sonic/help/ssh.md +60 -0
- data/lib/sonic/list.rb +4 -1
- data/lib/sonic/setting.rb +47 -0
- data/lib/sonic/ssh.rb +41 -20
- data/lib/sonic/ssh/identifier_detector.rb +6 -2
- data/lib/sonic/version.rb +1 -1
- data/sonic.gemspec +14 -9
- data/spec/lib/cli_spec.rb +5 -10
- data/spec/lib/sonic/execute_spec.rb +0 -1
- data/spec/spec_helper.rb +18 -10
- metadata +115 -16
- data/docs/_docs/tutorial-ecs-run.md +0 -100
- data/lib/sonic/cli/help.rb +0 -152
- data/lib/sonic/settings.rb +0 -115
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc8cb5fef87d05bf06b47548ad6d943fa90682269ac5493881bee38eb47e2e45
|
4
|
+
data.tar.gz: 7f19894b800b5b042cb86e984d25fa793fe7601f2f35578b76fd8c088edb1790
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 85d9a8a7cd31dc070265d3769f9ca654f34654e89d29d56b90a1772530781ff74d092210ed2479f780c1c8bc456e65ee822b0f1bc9a91d361a6950b6e42966f5
|
7
|
+
data.tar.gz: 8641e4970facbbb88546f9e542f2cc4fd07f4f3008c7c6287284e1e79977323c7865c14df74f5e667c758fbdec81c682743a37560bacb86907e3e2458bf714a6
|
@@ -0,0 +1,26 @@
|
|
1
|
+
#!/bin/bash -eux
|
2
|
+
|
3
|
+
# Even though specs also generate docs, lets run again to ensure clean slate
|
4
|
+
bundle exec rake docs
|
5
|
+
|
6
|
+
out=$(git status docs)
|
7
|
+
if [[ "$out" = *"nothing to commit"* ]]; then
|
8
|
+
exit
|
9
|
+
fi
|
10
|
+
|
11
|
+
COMMIT_MESSAGE="docs updated by circleci"
|
12
|
+
|
13
|
+
# If the last commit already updated the docs, then exit.
|
14
|
+
# Preventable measure to avoid infinite loop.
|
15
|
+
if git log -1 --pretty=oneline | grep "$COMMIT_MESSAGE" ; then
|
16
|
+
exit
|
17
|
+
fi
|
18
|
+
|
19
|
+
# If reach here, we have some changes on docs that we should commit.
|
20
|
+
# Even though s
|
21
|
+
git add docs
|
22
|
+
git commit -m "$COMMIT_MESSAGE"
|
23
|
+
|
24
|
+
# https://makandracards.com/makandra/12107-git-show-current-branch-name-only
|
25
|
+
current_branch=$(git rev-parse --abbrev-ref HEAD)
|
26
|
+
git push origin "$current_branch"
|
@@ -0,0 +1,70 @@
|
|
1
|
+
# Ruby CircleCI 2.0 configuration file
|
2
|
+
#
|
3
|
+
# Check https://circleci.com/docs/2.0/language-ruby/ for more details
|
4
|
+
#
|
5
|
+
version: 2
|
6
|
+
jobs:
|
7
|
+
build:
|
8
|
+
docker:
|
9
|
+
# specify the version you desire here
|
10
|
+
- image: circleci/ruby:2.5.1-node-browsers
|
11
|
+
|
12
|
+
# Specify service dependencies here if necessary
|
13
|
+
# CircleCI maintains a library of pre-built images
|
14
|
+
# documented at https://circleci.com/docs/2.0/circleci-images/
|
15
|
+
# - image: circleci/postgres:9.4
|
16
|
+
|
17
|
+
working_directory: ~/repo
|
18
|
+
|
19
|
+
steps:
|
20
|
+
- checkout
|
21
|
+
|
22
|
+
- run:
|
23
|
+
name: submodule sync
|
24
|
+
command: |
|
25
|
+
git submodule sync
|
26
|
+
git submodule update --init
|
27
|
+
|
28
|
+
# Download and cache dependencies
|
29
|
+
- restore_cache:
|
30
|
+
keys:
|
31
|
+
- v1-dependencies-{{ checksum "Gemfile" }}
|
32
|
+
# fallback to using the latest cache if no exact match is found
|
33
|
+
- v1-dependencies-
|
34
|
+
|
35
|
+
- run:
|
36
|
+
name: install dependencies
|
37
|
+
command: |
|
38
|
+
bundle install --jobs=4 --retry=3 --path vendor/bundle
|
39
|
+
|
40
|
+
- save_cache:
|
41
|
+
paths:
|
42
|
+
- ./vendor/bundle
|
43
|
+
key: v1-dependencies-{{ checksum "Gemfile" }}
|
44
|
+
|
45
|
+
# specs need git configured ad commit_docs.sh required it also
|
46
|
+
- run:
|
47
|
+
name: configure git
|
48
|
+
command: |
|
49
|
+
git config --global user.email "tongueroo@gmail.com"
|
50
|
+
git config --global user.name "Tung Nguyen"
|
51
|
+
|
52
|
+
# run tests!
|
53
|
+
- run:
|
54
|
+
name: run tests
|
55
|
+
command: |
|
56
|
+
mkdir /tmp/test-results
|
57
|
+
bundle exec rspec
|
58
|
+
|
59
|
+
- run:
|
60
|
+
name: commit cli reference docs
|
61
|
+
command: |
|
62
|
+
chmod a+x -R .circleci/bin
|
63
|
+
.circleci/bin/commit_docs.sh
|
64
|
+
|
65
|
+
# collect reports
|
66
|
+
- store_test_results:
|
67
|
+
path: /tmp/test-results
|
68
|
+
- store_artifacts:
|
69
|
+
path: /tmp/test-results
|
70
|
+
destination: test-results
|
data/.gitignore
CHANGED
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.5.1
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,17 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
This project *tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
|
5
5
|
|
6
|
+
## [2.0.0]
|
7
|
+
- Merge pull request #5 from boltopslabs/cli-template-upgrade
|
8
|
+
- improve css for docs site
|
9
|
+
- add CLI reference docs
|
10
|
+
- use JumpProxy option for bastion
|
11
|
+
- change the way settings work, usage of SONIC_PROFILE and AWS_PROFILE and separate files
|
12
|
+
- Big restructuring of sonic commands:
|
13
|
+
- sonic ecs exec
|
14
|
+
- sonic ecs run
|
15
|
+
- sonic execute # much improved and added conveniences
|
16
|
+
|
6
17
|
## [1.4.0]
|
7
18
|
- only use required aws-sdk modules
|
8
19
|
- update gemspec homepage
|
@@ -29,8 +40,8 @@ This project *tries* to adhere to [Semantic Versioning](http://semver.org/), eve
|
|
29
40
|
- standardize filter to be first argument
|
30
41
|
|
31
42
|
## [1.0.0]
|
32
|
-
- sonic ecs
|
33
|
-
- sonic ecs
|
43
|
+
- sonic ecs exec
|
44
|
+
- sonic ecs sh
|
34
45
|
- sonic execute
|
35
46
|
- sonic list
|
36
47
|
- sonic ssh
|
data/Gemfile
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
source
|
1
|
+
source "https://rubygems.org"
|
2
2
|
|
3
|
-
# Specify your gem
|
3
|
+
# Specify your gem dependencies in sonic.gemspec
|
4
4
|
gemspec
|
5
5
|
|
6
|
-
gem "codeclimate-test-reporter", group: :test, require: nil
|
6
|
+
gem "codeclimate-test-reporter", group: :test, require: nil
|
data/Gemfile.lock
CHANGED
@@ -1,41 +1,61 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
sonic-screwdriver (
|
4
|
+
sonic-screwdriver (2.0.0)
|
5
|
+
activesupport
|
5
6
|
aws-sdk-ec2
|
6
7
|
aws-sdk-ecs
|
8
|
+
aws-sdk-s3
|
7
9
|
aws-sdk-ssm
|
8
10
|
colorize
|
9
11
|
hashie
|
12
|
+
memoist
|
10
13
|
thor
|
11
14
|
tty-prompt
|
12
15
|
|
13
16
|
GEM
|
14
17
|
remote: https://rubygems.org/
|
15
18
|
specs:
|
16
|
-
|
17
|
-
|
19
|
+
activesupport (5.2.0)
|
20
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
21
|
+
i18n (>= 0.7, < 2)
|
22
|
+
minitest (~> 5.1)
|
23
|
+
tzinfo (~> 1.1)
|
24
|
+
aws-eventstream (1.0.0)
|
25
|
+
aws-partitions (1.89.1)
|
26
|
+
aws-sdk-core (3.21.2)
|
27
|
+
aws-eventstream (~> 1.0)
|
18
28
|
aws-partitions (~> 1.0)
|
19
29
|
aws-sigv4 (~> 1.0)
|
20
30
|
jmespath (~> 1.0)
|
21
|
-
aws-sdk-ec2 (1.
|
31
|
+
aws-sdk-ec2 (1.34.0)
|
22
32
|
aws-sdk-core (~> 3)
|
23
33
|
aws-sigv4 (~> 1.0)
|
24
|
-
aws-sdk-ecs (1.
|
34
|
+
aws-sdk-ecs (1.13.0)
|
25
35
|
aws-sdk-core (~> 3)
|
26
36
|
aws-sigv4 (~> 1.0)
|
27
|
-
aws-sdk-
|
37
|
+
aws-sdk-kms (1.5.0)
|
38
|
+
aws-sdk-core (~> 3)
|
39
|
+
aws-sigv4 (~> 1.0)
|
40
|
+
aws-sdk-s3 (1.13.0)
|
41
|
+
aws-sdk-core (~> 3, >= 3.21.2)
|
42
|
+
aws-sdk-kms (~> 1)
|
43
|
+
aws-sigv4 (~> 1.0)
|
44
|
+
aws-sdk-ssm (1.13.0)
|
28
45
|
aws-sdk-core (~> 3)
|
29
46
|
aws-sigv4 (~> 1.0)
|
30
47
|
aws-sigv4 (1.0.2)
|
48
|
+
byebug (10.0.2)
|
49
|
+
cli_markdown (0.1.0)
|
31
50
|
codeclimate-test-reporter (1.0.8)
|
32
51
|
simplecov (<= 0.13)
|
33
52
|
coderay (1.1.2)
|
34
53
|
colorize (0.8.1)
|
54
|
+
concurrent-ruby (1.0.5)
|
35
55
|
diff-lcs (1.3)
|
36
56
|
docile (1.1.5)
|
37
57
|
equatable (0.5.0)
|
38
|
-
ffi (1.9.
|
58
|
+
ffi (1.9.23)
|
39
59
|
formatador (0.2.5)
|
40
60
|
guard (2.14.2)
|
41
61
|
formatador (>= 0.2.4)
|
@@ -57,14 +77,18 @@ GEM
|
|
57
77
|
rspec (>= 2.99.0, < 4.0)
|
58
78
|
hashie (3.5.7)
|
59
79
|
hitimes (1.2.6)
|
60
|
-
|
80
|
+
i18n (1.0.1)
|
81
|
+
concurrent-ruby (~> 1.0)
|
82
|
+
jmespath (1.4.0)
|
61
83
|
json (2.1.0)
|
62
84
|
listen (3.1.5)
|
63
85
|
rb-fsevent (~> 0.9, >= 0.9.4)
|
64
86
|
rb-inotify (~> 0.9, >= 0.9.7)
|
65
87
|
ruby_dep (~> 1.2)
|
66
|
-
lumberjack (1.0.
|
88
|
+
lumberjack (1.0.13)
|
89
|
+
memoist (0.16.0)
|
67
90
|
method_source (0.9.0)
|
91
|
+
minitest (5.11.3)
|
68
92
|
necromancer (0.4.0)
|
69
93
|
nenv (0.3.0)
|
70
94
|
notiffany (0.1.1)
|
@@ -76,8 +100,8 @@ GEM
|
|
76
100
|
pry (0.11.3)
|
77
101
|
coderay (~> 1.1.0)
|
78
102
|
method_source (~> 0.9.0)
|
79
|
-
rake (12.3.
|
80
|
-
rb-fsevent (0.10.
|
103
|
+
rake (12.3.1)
|
104
|
+
rb-fsevent (0.10.3)
|
81
105
|
rb-inotify (0.9.10)
|
82
106
|
ffi (>= 0.5.0, < 2)
|
83
107
|
rspec (3.7.0)
|
@@ -101,21 +125,24 @@ GEM
|
|
101
125
|
simplecov-html (~> 0.10.0)
|
102
126
|
simplecov-html (0.10.2)
|
103
127
|
thor (0.20.0)
|
128
|
+
thread_safe (0.3.6)
|
104
129
|
timers (4.1.2)
|
105
130
|
hitimes
|
106
131
|
tty-color (0.4.2)
|
107
132
|
tty-cursor (0.5.0)
|
108
|
-
tty-prompt (0.
|
133
|
+
tty-prompt (0.16.1)
|
109
134
|
necromancer (~> 0.4.0)
|
110
135
|
pastel (~> 0.7.0)
|
111
136
|
timers (~> 4.0)
|
112
137
|
tty-cursor (~> 0.5.0)
|
113
|
-
tty-reader (~> 0.
|
114
|
-
tty-reader (0.
|
138
|
+
tty-reader (~> 0.3.0)
|
139
|
+
tty-reader (0.3.0)
|
115
140
|
tty-cursor (~> 0.5.0)
|
116
141
|
tty-screen (~> 0.6.4)
|
117
142
|
wisper (~> 2.0.0)
|
118
143
|
tty-screen (0.6.4)
|
144
|
+
tzinfo (1.2.5)
|
145
|
+
thread_safe (~> 0.1)
|
119
146
|
wisper (2.0.0)
|
120
147
|
|
121
148
|
PLATFORMS
|
@@ -123,6 +150,8 @@ PLATFORMS
|
|
123
150
|
|
124
151
|
DEPENDENCIES
|
125
152
|
bundler
|
153
|
+
byebug
|
154
|
+
cli_markdown
|
126
155
|
codeclimate-test-reporter
|
127
156
|
guard
|
128
157
|
guard-bundler
|
data/Guardfile
CHANGED
@@ -1,12 +1,19 @@
|
|
1
|
-
guard
|
2
|
-
watch(
|
3
|
-
watch(
|
4
|
-
watch(%r{^lib/sonic/(.+)\.rb$}) { "spec/sonic_spec.rb" }
|
5
|
-
watch('spec/spec_helper.rb') { "spec/sonic_spec.rb" }
|
6
|
-
watch(%r{^lib/sonic/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
|
1
|
+
guard "bundler", cmd: "bundle" do
|
2
|
+
watch("Gemfile")
|
3
|
+
watch(/^.+\.gemspec/)
|
7
4
|
end
|
8
5
|
|
9
|
-
guard
|
10
|
-
|
11
|
-
|
12
|
-
|
6
|
+
guard :rspec, cmd: "bundle exec rspec" do
|
7
|
+
require "guard/rspec/dsl"
|
8
|
+
dsl = Guard::RSpec::Dsl.new(self)
|
9
|
+
|
10
|
+
# RSpec files
|
11
|
+
rspec = dsl.rspec
|
12
|
+
watch(rspec.spec_helper) { rspec.spec_dir }
|
13
|
+
watch(rspec.spec_support) { rspec.spec_dir }
|
14
|
+
watch(rspec.spec_files)
|
15
|
+
|
16
|
+
# Ruby files
|
17
|
+
ruby = dsl.ruby
|
18
|
+
dsl.watch_spec_files_for(ruby.lib_files)
|
19
|
+
end
|
data/LICENSE.txt
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Copyright (c)
|
1
|
+
Copyright (c) 2018 Tung Nguyen
|
2
2
|
|
3
3
|
MIT License
|
4
4
|
|
@@ -19,4 +19,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
19
19
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
20
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
21
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
CHANGED
@@ -51,26 +51,26 @@ Here is a quick overview of sonic abilities:
|
|
51
51
|
```sh
|
52
52
|
# ssh into an instance
|
53
53
|
sonic ssh i-0f7f833131a51ce35
|
54
|
-
sonic ssh hi-web
|
55
|
-
sonic ssh hi-web
|
56
|
-
sonic ssh hi-web
|
57
|
-
sonic ssh 7fbc8c75-4675-4d39-a5a4-0395ff8cd474 --cluster
|
58
|
-
sonic ssh 1ed12abd-645c-4a05-9acf-739b9d790170 --cluster
|
54
|
+
sonic ssh hi-web # ec2 tag
|
55
|
+
sonic ssh hi-web --cluster staging # ecs service name
|
56
|
+
sonic ssh hi-web --cluster staging # ecs service name
|
57
|
+
sonic ssh 7fbc8c75-4675-4d39-a5a4-0395ff8cd474 --cluster staging # ECS container id
|
58
|
+
sonic ssh 1ed12abd-645c-4a05-9acf-739b9d790170 --cluster staging # ECS task id
|
59
59
|
|
60
60
|
# docker exec to a running ECS docker container
|
61
|
-
sonic ecs
|
61
|
+
sonic ecs exec hi-web
|
62
62
|
|
63
63
|
# docker run with the same environment as the ECS docker running containers
|
64
|
-
sonic ecs
|
64
|
+
sonic ecs sh hi-web
|
65
65
|
|
66
66
|
# run command on 1 instance
|
67
67
|
sonic execute i-0f7f833131a51ce35 uptime
|
68
68
|
|
69
|
-
# run command on all instances tagged with hi-web
|
70
|
-
sonic execute hi-web
|
69
|
+
# run command on all instances tagged with hi-web and worker
|
70
|
+
sonic execute hi-web,hi-worker uptime
|
71
71
|
|
72
72
|
# list ec2 instances
|
73
|
-
sonic list hi-web
|
73
|
+
sonic list hi-web
|
74
74
|
```
|
75
75
|
|
76
76
|
## Contributing
|
data/Rakefile
CHANGED
@@ -1,6 +1,13 @@
|
|
1
1
|
require "bundler/gem_tasks"
|
2
2
|
require "rspec/core/rake_task"
|
3
3
|
|
4
|
-
task :
|
4
|
+
task default: :spec
|
5
5
|
|
6
|
-
RSpec::Core::RakeTask.new
|
6
|
+
RSpec::Core::RakeTask.new
|
7
|
+
|
8
|
+
require_relative "lib/sonic"
|
9
|
+
require "cli_markdown"
|
10
|
+
desc "Generates cli reference docs as markdown"
|
11
|
+
task :docs do
|
12
|
+
CliMarkdown::Creator.create_all(cli_class: Sonic::CLI, cli_name: "sonic")
|
13
|
+
end
|
data/docs/_config.yml
CHANGED
data/docs/_docs/help.md
CHANGED
@@ -7,21 +7,13 @@ It is common to secure your network setup by restricting access to your servers
|
|
7
7
|
You can configure the [settings.yml]({% link _docs/settings.md %}) file to use a bastion host. Here's an example:
|
8
8
|
|
9
9
|
```yaml
|
10
|
-
bastion:
|
11
|
-
|
12
|
-
|
13
|
-
|
10
|
+
bastion:
|
11
|
+
host: ec2-user@34.211.223.3
|
12
|
+
host_key_check: false
|
13
|
+
user: ec2-user # user for 2nd level servers
|
14
14
|
```
|
15
15
|
|
16
|
-
The
|
17
|
-
|
18
|
-
```sh
|
19
|
-
sonic ssh --cluster prod [IDENTIFER] # ec2-user@bastion.mydomain.com used as the bastion host
|
20
|
-
sonic ssh --cluster stag [IDENTIFER] # ubuntu@bastion-stag.mydomain.com used as the bastion host
|
21
|
-
sonic ssh --cluster whatever [IDENTIFER] # ec2-user@bastion.mydomain.com used as the bastion host
|
22
|
-
```
|
23
|
-
|
24
|
-
The settting directs the `sonic ssh` to jump through the bastion host. This works completely transparently. The sonic commands are exactly the same as if there is no bastion host. Examples:
|
16
|
+
The settting directs the `sonic ssh` to jump through the bastion host. This works transparently. The sonic commands are exactly the same as if there is no bastion host. Examples:
|
25
17
|
|
26
18
|
```
|
27
19
|
sonic ssh i-0f7f833131a51ce35
|
@@ -32,8 +24,6 @@ You should notice that the built up command now includes the bastion jump host.
|
|
32
24
|
```
|
33
25
|
$ sonic ssh i-0f7f833131a51ce35 uptime
|
34
26
|
=> ssh -At ec2-user@34.211.223.3 ssh ec2-user@10.10.110.135 uptime
|
35
|
-
Warning: Permanently added '34.211.223.3' (ECDSA) to the list of known hosts.
|
36
|
-
Warning: Permanently added '10.10.110.135' (ECDSA) to the list of known hosts.
|
37
27
|
18:35:18 up 1:14, 0 users, load average: 0.24, 0.07, 0.02
|
38
28
|
Connection to 34.211.223.3 closed.
|
39
29
|
$
|