Skip to content

Commit ff38a5b

Browse files
committedApr 14, 2022
changed sftp calls to use IdentityFile as it will in Kuberenetes
1 parent 103a0a5 commit ff38a5b

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed
 

‎docker-compose.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ services:
1818
image: 'atmoz/sftp'
1919
volumes:
2020
- ./sftp/bib_search:/home/alma/bib_search
21-
- ./sftp/ssh/id_rsa.pub:/home/alma/.ssh/keys/id_rsa.pub:ro
21+
- ./sftp/ssh/ssh_client_rsa_key.pub:/home/alma/.ssh/keys/id_rsa.pub:ro
2222
- ./sftp/ssh/ssh_host_ed25519_key:/etc/ssh/ssh_host_ed25519_key
2323
- ./sftp/ssh/ssh_host_rsa_key:/etc/ssh/ssh_host_rsa_key
2424
command: alma:1001
@@ -29,6 +29,7 @@ services:
2929
- 'redis'
3030
volumes:
3131
- ./umich_catalog_indexing/.:/app
32+
- ./sftp/ssh/ssh_client_rsa_key:/etc/secret-volume/id_rsa:ro
3233
- gem_cache:/gems
3334
environment:
3435
- SOLR_URL=http://solr:8026/solr/biblio

‎set_up_development_ssh_keys.sh

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
#!/bin/bash
22

33
#clear out any current ssh keys
4-
rm umich_catalog_indexing/.ssh/*
5-
rm sftp/ssh/ssh_host*
6-
rm ssh_host*
4+
rm sftp/ssh/ssh_*
5+
rm ssh_*
76

87

98
#generate the host ssh keys for the sftp service
@@ -24,6 +23,5 @@ rm ssh_host*
2423
#generate actual host login keys
2524
ssh-keygen -t rsa -b 4096 -f ssh_client_rsa_key < /dev/null
2625

27-
cp ssh_client_rsa_key.pub sftp/ssh/id_rsa.pub
28-
mv ssh_client_rsa_key.pub umich_catalog_indexing/.ssh/id_rsa.pub
29-
mv ssh_client_rsa_key umich_catalog_indexing/.ssh/id_rsa
26+
mv ssh_client_rsa_key.pub sftp/ssh/
27+
mv ssh_client_rsa_key sftp/ssh/

‎umich_catalog_indexing/.env-dev-values

+1
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ HATHI_OVERLAP_PASSWORD=pass
99
ALMA_API_HOST='https://api-na.hosted.exlibrisgroup.com'
1010
SFTP_USER=alma
1111
SFTP_HOST=sftp
12+
SSH_KEY_PATH="/etc/secret-volume/id_rsa"

‎umich_catalog_indexing/bin/m_delete_ids

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ pkg_file=$1
77

88
#copy file from alma-integrations to scratch directory
99
# '@' removes printing interactive session
10-
sftp -b - alma@sftp << EOT
10+
sftp -oIdentityFile=/etc/secret-volume/id_rsa -b - alma@sftp << EOT
1111
@get $pkg_file scratch
1212
EOT
1313

‎umich_catalog_indexing/bin/mindex_xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pkg_file=$1
1414

1515
#copy file from alma-integrations to scratch directory
1616
# '@' removes printing interactive session
17-
sftp -b - alma@sftp << EOT
17+
sftp -oIdentityFile=/etc/secret-volume/id_rsa -b - alma@sftp << EOT
1818
@get $pkg_file scratch
1919
EOT
2020

0 commit comments

Comments
 (0)