Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F42042841
new-es-password.sh
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
taavi
Feb 22 2024, 1:59 PM
2024-02-22 13:59:08 (UTC+0)
Size
603 B
Referenced Files
None
Subscribers
None
new-es-password.sh
View Options
#!/bin/bash
# Ugly script to generate password data
# for the Toolforge elasticsearch cluster
set
-o nounset
set
-o errexit
USER
=
${
1
:?Missing USER
}
PASS
=
$(
openssl rand -base64
32
)
SHA512
=
$(
printf
$PASS
|
mkpasswd --stdin --method
=
sha-512
)
echo
"
${
1
}
envvars"
echo
"toolforge envvars create TOOL_ELASITCSEARCH_USER
${
USER
}
"
echo
"toolforge envvars create TOOL_ELASITCSEARCH_PASSWORD
${
PASS
}
"
echo
echo
"
${
1
}
puppet master private (hieradata/labs/tools/common.yaml)"
echo
"----"
echo
"profile::toolforge::elasticsearch::haproxy::elastic_users:"
echo
" - name: '
${
1
}
'"
echo
" password: '
${
SHA512
}
'"
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14660370
Default Alt Text
new-es-password.sh (603 B)
Attached To
Mode
P4372 new-es-password.sh
Attached
Detach File
Event Timeline
Log In to Comment