Skip to content

Commit

Permalink
try with moved up
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Crawford <[email protected]>
  • Loading branch information
stephen-crawford committed Sep 21, 2023
1 parent a69b844 commit 3821161
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/plugin_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,16 @@ jobs:

# Move and rename the plugin for installation
- name: Move and rename the plugin for installation
run: mv ./build/distributions/${{ env.PLUGIN_NAME }}-*.zip ${{ env.PLUGIN_NAME }}.zip
run: |
mv ./build/distributions/${{ env.PLUGIN_NAME }}-*.zip ${{ env.PLUGIN_NAME }}.zi
echo installPassword >> ./opensearch-${{ env.OPENSEARCH_VERSION }}-SNAPSHOT/config/opensearch-security/initialAdminPassword.txt
shell: bash

- name: Create Setup Script
if: ${{ runner.os == 'Linux' }}
run: |
cat > setup.sh <<'EOF'
echo "listing " ./opensearch-${{ env.OPENSEARCH_VERSION }}-SNAPSHOT
ls ./opensearch-${{ env.OPENSEARCH_VERSION }}-SNAPSHOT
echo "listing " ./opensearch-${{ env.OPENSEARCH_VERSION }}-SNAPSHOT/config
ls ./opensearch-${{ env.OPENSEARCH_VERSION }}-SNAPSHOT/config
echo installPassword >> ./opensearch-${{ env.OPENSEARCH_VERSION }}-SNAPSHOT/config/opensearch-security/initialAdminPassword.txt
echo "listing " ./opensearch-${{ env.OPENSEARCH_VERSION }}-SNAPSHOT/config/opensearch-security
./opensearch-${{ env.OPENSEARCH_VERSION }}-SNAPSHOT/config/opensearch-security
chmod +x ./opensearch-${{ env.OPENSEARCH_VERSION }}-SNAPSHOT/plugins/${{ env.PLUGIN_NAME }}/tools/install_demo_configuration.sh
/bin/bash -c "yes | ./opensearch-${{ env.OPENSEARCH_VERSION }}-SNAPSHOT/plugins/${{ env.PLUGIN_NAME }}/tools/install_demo_configuration.sh"
Expand Down
4 changes: 2 additions & 2 deletions tools/install_demo_configuration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,8 @@ echo 'plugins.security.system_indices.indices: [".plugins-ml-config", ".plugins-

if [[ -n "$initialAdminPassword" ]]; then
ADMIN_PASSWORD="$initialAdminPassword"
elif [[ -f "$OPENSEARCH_CONF_DIR/opensearch-security/initialAdminPassword.txt" && -s "$OPENSEARCH_CONF_DIR/opensearch-security/initialAdminPassword.txt" ]]; then
ADMIN_PASSWORD=$(head -n 1 "$OPENSEARCH_CONF_DIR/opensearch-security/initialAdminPassword.txt")
elif [[ -f "$ADMIN_PASSWORD_FILE" && -s "$ADMIN_PASSWORD_FILE" ]]; then
ADMIN_PASSWORD=$(head -n 1 "$ADMIN_PASSWORD_FILE")
else
echo "Unable to find the admin password for the cluster. Please run 'export initialAdminPassword=<your_password>' or create a file {OPENSEARCH_ROOT}/config/initialAdminPassword.txt with a single line that contains the password."
exit 1
Expand Down

0 comments on commit 3821161

Please sign in to comment.