Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PrivateStorageio
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PrivateStorage
PrivateStorageio
Commits
0fa5dcc0
Commit
0fa5dcc0
authored
3 years ago
by
Jean-Paul Calderone
Browse files
Options
Downloads
Plain Diff
Merge branch '71.ssh-known_hosts-files' into 'develop'
Burn in some SSH host key knowledge Closes
#71
See merge request
!130
parents
d1d42ecb
210b1dc2
No related branches found
Branches containing commit
No related tags found
3 merge requests
!140
Merge staging into production
,
!133
Merge develop into staging
,
!130
Burn in some SSH host key knowledge
Pipeline
#887
passed
3 years ago
Stage: build
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
ci-tools/known_hosts.production
+7
-0
7 additions, 0 deletions
ci-tools/known_hosts.production
ci-tools/known_hosts.staging
+3
-0
3 additions, 0 deletions
ci-tools/known_hosts.staging
ci-tools/update-grid-servers
+17
-2
17 additions, 2 deletions
ci-tools/update-grid-servers
with
27 additions
and
2 deletions
ci-tools/known_hosts.production
0 → 100644
+
7
−
0
View file @
0fa5dcc0
monitoring.private.storage ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGvKv2y+IAL4+oDnX7Cm5G9QuADBHUj9OxzLX0okf6hF
payments.private.storage ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJBlyFTJyN+VDlzGWANKqBlXeexlX/xTpp6gb5sUlA9U
storage001.private.storage ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILQojjGVvmjZfDcrlec8ZmpbzMEeHd4+t4DJq1R/NUXw
storage002.private.storage ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKDWqK7FBzT4L1eoIU/iaEZNZxq3Jr613PmK2nbAXFs2
storage003.private.storage ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHobJpQVv9GaTv8Xh9CGlL7BL5yKLxCiD3ZDdVTyt0Ep
storage004.private.storage ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJy96VEPp617ewxdkt+8ZgWcYkLxlVG/C7bZAq0ULH+z
storage005.private.storage ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKOgJBoER0lX2Rx8UIfv/3MVJXNFn9RldYmpU+EqAc9H
This diff is collapsed.
Click to expand it.
ci-tools/known_hosts.staging
0 → 100644
+
3
−
0
View file @
0fa5dcc0
monitoring.privatestorage-staging.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINI9kvEBaOMvpWqcFH+6nFvRriBECKB4RFShdPiIMkk9
payments.privatestorage-staging.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK0eO/01VFwdoZzpclrmu656eaMkE19BaxtDdkkFHMa8
storage001.privatestorage-staging.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFP8L6OHCxq9XFd8ME8ZrCbmO5dGZDPH8I5dm0AwSGiN
This diff is collapsed.
Click to expand it.
ci-tools/update-grid-servers
+
17
−
2
View file @
0fa5dcc0
...
...
@@ -8,6 +8,10 @@
set -euxo pipefail
# Find the location of this script so we can refer to data files with a known
# relative location.
HERE=$(dirname $0)
# Get the path to the ssh key which authorizes us to deliver this
# notification.
DEPLOY_KEY=$1
...
...
@@ -21,13 +25,24 @@ shift
# Tell one server to update itself.
update_one_node() {
grid_name=$1
shift
deploy_key=$1
shift
node=$1
shift
ssh -i "${deploy_key}" "deployment@${node}"
# Avoid both the "host key unknown" prompt and the possibility for a
# man-in-the-middle attack (on every single deploy!) by referring to a
# pre-initialized known hosts file for this grid.
#
# Then use the specified deploy key to authenticate as the deployment user
# and trigger the update on the host. There's no command here because the
# deployment key is restricted *only* the deloyment update command and the
# ssh server will supply that command itself.
ssh -o "UserKnownHostsFile=${HERE}/known_hosts.${grid_name}" -i "${deploy_key}" "deployment@${node}"
}
# Tell all servers belonging to one grid to update themselves.
...
...
@@ -65,7 +80,7 @@ update_grid_nodes() {
# This isn't a server, it's part of the morph configuration.
continue
fi
update_one_node "${deploy_key}" "${node}.${domain}"
update_one_node
"${gridname}"
"${deploy_key}" "${node}.${domain}"
done
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment