mirror of
https://github.com/kasmtech/workspaces-core-images.git
synced 2026-07-17 16:37:15 +00:00
KASM-4046 fix unrelated pipeline issues
This commit is contained in:
parent
50de489e95
commit
481da159a9
3 changed files with 28 additions and 6 deletions
|
|
@ -19,11 +19,20 @@ export AWS_DEFAULT_REGION=us-east-1
|
|||
|
||||
# Install tools for testing
|
||||
apk add \
|
||||
aws-cli \
|
||||
curl \
|
||||
jq \
|
||||
openssh-client
|
||||
|
||||
AWS_CLI_IMAGE=public.ecr.aws/aws-cli/aws-cli:2.34.33
|
||||
|
||||
aws() {
|
||||
docker run --rm \
|
||||
-e AWS_ACCESS_KEY_ID \
|
||||
-e AWS_SECRET_ACCESS_KEY \
|
||||
-e AWS_DEFAULT_REGION \
|
||||
"${AWS_CLI_IMAGE}" "$@"
|
||||
}
|
||||
|
||||
## Functions ##
|
||||
# Ami locater
|
||||
getami () {
|
||||
|
|
@ -88,7 +97,7 @@ aws ec2 run-instances \
|
|||
--security-group-ids sg-029d5bc88b001fbe5 \
|
||||
--subnet-id subnet-0ee70521f1f979f5f \
|
||||
--associate-public-ip-address \
|
||||
--user-data file:///root/user-data \
|
||||
--user-data "$(cat /root/user-data)" \
|
||||
--block-device-mapping '[ { "DeviceName": "/dev/sda1", "Ebs": { "VolumeSize": 120 } } ]' \
|
||||
--instance-initiated-shutdown-behavior terminate > /tmp/instance.json
|
||||
INSTANCE=$(cat /tmp/instance.json | jq -r " .Instances[0].InstanceId")
|
||||
|
|
|
|||
|
|
@ -27,6 +27,16 @@ elif [[ "${DISTRO}" == "parrotos7" ]]; then
|
|||
apt-get update
|
||||
DEBIAN_FRONTEND=noninteractive apt-get upgrade -y
|
||||
else
|
||||
if [ "${DISTRO}" == "parrotos6" ]; then
|
||||
if ! getent group kasm-default-profile >/dev/null; then
|
||||
groupadd --system kasm-default-profile
|
||||
fi
|
||||
if ! id kasm-default-profile >/dev/null 2>&1; then
|
||||
useradd --system --gid kasm-default-profile --home-dir /home/kasm-default-profile --shell /usr/sbin/nologin kasm-default-profile
|
||||
fi
|
||||
fi
|
||||
apt-get update
|
||||
DEBIAN_FRONTEND=noninteractive apt-get upgrade -y
|
||||
DEBIAN_FRONTEND=noninteractive apt-get upgrade -y \
|
||||
-o Dpkg::Options::="--force-confdef" \
|
||||
-o Dpkg::Options::="--force-confold"
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -29,9 +29,12 @@ fi
|
|||
if [[ "${DISTRO}" == @(oracle8|oracle9|rhel9|fedora42|fedora43|almalinux8|almalinux9|rockylinux8|rockylinux9|alpine) ]]; then
|
||||
useradd --system --shell /usr/sbin/nologin --home-dir /bin proxy
|
||||
elif [ "${DISTRO}" == "opensuse" ]; then
|
||||
useradd --system --shell /usr/sbin/nologin --home-dir /bin proxy
|
||||
groupadd -f -g 65511 proxy
|
||||
usermod -a -G proxy proxy
|
||||
if ! getent group proxy >/dev/null; then
|
||||
groupadd -g 65511 proxy
|
||||
fi
|
||||
if ! id proxy >/dev/null 2>&1; then
|
||||
useradd --system --shell /usr/sbin/nologin --home-dir /bin -g proxy proxy
|
||||
fi
|
||||
fi
|
||||
|
||||
# File and perms
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue