diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index 3250bb4989..7b99effdc2 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -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" diff --git a/tools/install_demo_configuration.sh b/tools/install_demo_configuration.sh index ac06938685..8d600c1688 100755 --- a/tools/install_demo_configuration.sh +++ b/tools/install_demo_configuration.sh @@ -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=' or create a file {OPENSEARCH_ROOT}/config/initialAdminPassword.txt with a single line that contains the password." exit 1