Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix/crdant/makes sure tmux runs #356

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,17 @@ MANIFEST
# make sure all files in the release directory are owned by the replicant user
chown -R replicant:replicant ${HOME_DIR}/release

### Assure the tmux session exists
#
# In a test scenario Instuqt does not run the user shell for the
# challenge, which means the tmux session is never established. We
# need to session for the solve scripts for other challenges to
# succeed, so let's create it here.
#
if ! tmux has-session -t shell ; then
tmux new-session -d -s shell su - replicant
fi

# make sure the user has the CLI environment variables set up in their sehll
tmux send-keys -t shell export SPACE 'REPLICATED_API_TOKEN=' "$(agent variable get REPLICATED_API_TOKEN)" ENTER
tmux send-keys -t shell export SPACE 'REPLICATED_APP=' "$(agent variable get REPLICATED_APP)" ENTER
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,6 @@ curl -f https://replicated.app/embedded/${app_slug}/stable \

echo "The install command takes a long time and Instruqt can't handle its output..."

./${app_slug} install --license license.yaml --no-prompt --skip-host-preflights > /dev/null

export KUBECONFIG="/var/lib/k0s/pki/admin.conf"
export PATH="/var/lib/embedded-cluster/bin:${PATH}"

# set the admin console password
echo "Setting the admin console password... $(agent variable get ADMIN_CONSOLE_PASSWORD)"
echo "$(agent variable get ADMIN_CONSOLE_PASSWORD)" | kubectl kots reset-password --namespace kotsadm
./${app_slug} install --license license.yaml --no-prompt --skip-host-preflights --admin-console-password $(agent variable get ADMIN_CONSOLE_PASSWORD) > /dev/null

exit 0
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
set -euxo pipefail
source /etc/profile.d/header.sh

ec_install_dir="/var/lib/embedded-cluster"
app_slug=$(get_app_slug)
export KUBECONFIG="/var/lib/k0s/pki/admin.conf"
export PATH="/var/lib/embedded-cluster/bin:${PATH}"
export KUBECONFIG="${ec_install_dir}/k0s/pki/admin.conf"
export PATH="${ec_install_dir}/bin:${PATH}"

result=0
status=$(kubectl get deploy --namespace kotsadm slackernews --output json | jq -r '.status.conditions[] | select( .type == "Available" ) | .status')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ fi

# download the Replicated KOTS CLI, which plugs into the `kubectl` command
# and provides a subcommend to reset the password for the admin console
mkdir -p /var/lib/embedded-cluster/bin
export REPL_INSTALL_PATH=/var/lib/embedded-cluster/bin
ec_install_dir=/var/lib/embedded-cluster
mkdir -p ${ec_install_dir}/bin
export REPL_INSTALL_PATH=${ec_install_dir}/bin
curl https://kots.io/install | bash

agent variable set SLACKERNEWS_DOMAIN $(get_slackernews_domain)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@
set -euxo pipefail
source /etc/profile.d/header.sh

ec_install_dir="/var/lib/embedded-cluster"

app_slug=$(get_app_slug)
app_id=$(get_app_id)
api_token=$(agent variable get REPLICATED_API_TOKEN)
customer_id=$(agent variable get CUSTOMER_ID)
license_id=$(agent variable get LICENSE_ID)

export KUBECONFIG="/var/lib/k0s/pki/admin.conf"
export PATH="/var/lib/embedded-cluster/bin:${PATH}"
export KUBECONFIG="${ec_install_dir}/k0s/pki/admin.conf"
export PATH="${ec_install_dir}/bin:${PATH}"

# prepare values for installation
cat <<CONFIG_VALUES > /tmp/config-values.yaml
Expand Down
2 changes: 1 addition & 1 deletion instruqt/delivering-as-an-appliance/track.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ lab_config:
hideStopButton: false
default_layout: AssignmentRight
default_layout_sidebar_size: 25
checksum: "9911192172985670499"
checksum: "8888110905668754440"
3 changes: 1 addition & 2 deletions instruqt/distributing-with-replicated/track.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ lab_config:
feedback_recap_enabled: true
feedback_tab_enabled: false
loadingMessages: true
lab_v2: false
hideStopButton: false
default_layout: AssignmentRight
default_layout_sidebar_size: 33
checksum: "9648206013188099501"
checksum: "2082361330332165496"
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ you need to work with the Platform from the web, the command-line, and
anywhere you can invoke its APIs.

This lab will introduce you to the Replicated Platform through the Vendor
Portal. After getting to know the Vendor Portal, you'll take the role of the
customers and install [SlackerNews](https://slackernews.io), an application
Portal. After getting to know the Vendor Portal, you'll take the role of a
customer and install [SlackerNews](https://slackernews.io), an application
distributed with Replicated. From there, we'll show you how you'll work with
customers having a support issue, and how they'll install a fix.


Loading