Skip to content
Merged
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
10 changes: 7 additions & 3 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@

"backend":
- changed-files:
- any-glob-to-any-file:
- all-globs-to-any-file:
- "Backend*/**"
- "!**/*.sh"
- "!**/*docker*"
- "!**/*Docker*"

"bash":
- changed-files:
Expand Down Expand Up @@ -50,9 +53,10 @@
"docker":
- changed-files:
- any-glob-to-any-file:
- "**/.dockerignore"
- "**/*docker*"
- "**/*Docker*"
- "**/docker_home/**"
- "**/Dockerfile"
- "Backend/launch.sh"

"documentation":
- changed-files:
Expand Down
3 changes: 1 addition & 2 deletions Backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ ENV APP_FILES=${HOME}/.CombineFiles

# Install system dependencies.
RUN apt-get update \
&& apt-get install -y \
ffmpeg \
&& apt-get install -y ffmpeg \
&& rm -rf /var/lib/apt/lists/*

# Create the home directory for the new app user.
Expand Down
3 changes: 2 additions & 1 deletion deploy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/*

# Install kubectl and helm
RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" && \
RUN MACH=amd64 && \
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/${MACH}/kubectl" && \
install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl && \
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 && \
chmod 700 get_helm.sh && \
Expand Down
15 changes: 11 additions & 4 deletions deploy/scripts/install-combine.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,13 @@ install-kubernetes () {
# Setup Kubernetes environment and WiFi Access Point
cd ${DEPLOY_DIR}/ansible

# Set -e/--extra-vars for ansible-playbook
EXTRA_VARS="-e k8s_user=${whoami}"
if [ -d "${DEPLOY_DIR}/airgap-images" ] ; then
ansible-playbook playbook_desktop_setup.yml -K -e k8s_user=`whoami` -e install_airgap_images=true $(((DEBUG == 1)) && echo "-vv")
else
ansible-playbook playbook_desktop_setup.yml -K -e k8s_user=`whoami` $(((DEBUG == 1)) && echo "-vv")
EXTRA_VARS="${EXTRA_VARS} -e install_airgap_images=true"
fi

ansible-playbook playbook_desktop_setup.yml -K ${EXTRA_VARS} $(((DEBUG == 1)) && echo "-vv")
}

# Set the KUBECONFIG environment variable so that the cluster can
Expand Down Expand Up @@ -138,7 +140,12 @@ install-the-combine () {
cd ${DEPLOY_DIR}/scripts
set-combine-env
set-k3s-env
./setup_combine.py --tag ${COMBINE_VERSION} --repo public.ecr.aws/thecombine --target desktop ${SETUP_OPTS} $(((DEBUG == 1)) && echo "--debug")
./setup_combine.py \
$(((DEBUG == 1)) && echo "--debug") \
--repo public.ecr.aws/thecombine \
--tag ${COMBINE_VERSION} \
--target desktop \
${SETUP_OPTS}
deactivate
}

Expand Down
12 changes: 6 additions & 6 deletions deploy/scripts/package_images.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ def package_images(image_list: List[str], tar_file: Path, *, debug: bool = False
container_cli_cmd.extend(["--namespace", "k8s.io"])

# Pull each image
pull_cmd = container_cli_cmd + ["pull"]
for image in image_list:
pull_cmd = container_cli_cmd + ["pull", image]
run_cmd(pull_cmd, print_cmd=debug, print_output=debug)
run_cmd(pull_cmd + [image], print_cmd=debug, print_output=debug)

# Save pulled images into a .tar archive
save_cmd = container_cli_cmd + ["save"] + image_list + ["-o", str(tar_file)]
Expand Down Expand Up @@ -149,9 +149,8 @@ def package_middleware(
middleware_images.append(match.group(1))

logging.debug(f"Middleware images: {middleware_images}")
package_images(
middleware_images, image_dir / "middleware-airgap-images-amd64.tar", debug=debug
)
out_path = image_dir / "middleware-airgap-images-amd64.tar"
package_images(middleware_images, out_path, debug=debug)


def package_thecombine(tag: str, image_dir: Path, *, debug: bool = False) -> None:
Expand Down Expand Up @@ -186,7 +185,8 @@ def package_thecombine(tag: str, image_dir: Path, *, debug: bool = False) -> Non
logging.debug(f"Combine images: {combine_images}")

# Logout of AWS to allow pulling the images
package_images(combine_images, image_dir / "combine-airgap-images-amd64.tar", debug=debug)
out_path = image_dir / "combine-airgap-images-amd64.tar"
package_images(combine_images, out_path, debug=debug)


def main() -> None:
Expand Down
Loading