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
1 change: 0 additions & 1 deletion .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
- master
env:
AWS_DIRS: |
EnvironmentSetup/AWS/Source/cluster-autoscaler/
EnvironmentSetup/AWS/Source/deployments/
EnvironmentSetup/AWS/Source/hpa/
EnvironmentSetup/AWS/Source/ingress/
Expand Down
25 changes: 23 additions & 2 deletions EnvironmentSetup/AWS/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The following CLI tools are required to be installed on your local machine to co

* **AWS CLIv2** - https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html#getting-started-install-instructions

* **Kubectl >= 1.24** - https://kubernetes.io/docs/tasks/tools/install-kubectl/
* **Kubectl >= 1.34.0** - https://kubernetes.io/docs/tasks/tools/install-kubectl/

* **Docker v20.10 or newer** - https://docs.docker.com/get-docker/

Expand All @@ -26,7 +26,7 @@ The automated configuration tool will use the following default values when buil
* AMI Instance Type: c5.2xlarge
* Disk Size: 30GB
* Node Group scaling configuration: [Minimum size: 2, Maximum size: 10, Desired size: 2]
* Kubernetes Version: 1.22
* Kubernetes Version: 1.33

To change any of the above defaults open `Source/terraform/variables.tf`, modify accordingly and save file.

Expand Down Expand Up @@ -131,6 +131,27 @@ The default credentials for this API are:

Password: P7g[/Y8v?KR}#YvN

**Step 11.** Need to uncomment livenessProbe and startupProbe in active-web-elements-server-deployment.yaml file and apply it on was namespace as;

```
# startupProbe:
# httpGet:
# path: /.applicationserver/kernel/readiness
# port: 8080
# initialDelaySeconds: 15
# periodSeconds: 10
# failureThreshold: 100
# livenessProbe:
# failureThreshold: 3
# httpGet:
# path: '/.applicationserver/kernel/stats?require-running-kernels=true'
# port: 8080
# initialDelaySeconds: 20
# periodSeconds: 20
# successThreshold: 1
# timeoutSeconds: 1
```
kubectl apply -f active-web-elements-server-deployment.yaml -n was

To change these, see the [configuration documentation](../../Configuration.md).

Expand Down
88 changes: 64 additions & 24 deletions EnvironmentSetup/AWS/Source/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,66 @@
FROM ubuntu:focal
ENV KUBECTL_VERSION='v1.24.0'
ENV DEBIAN_FRONTEND=noninteractive
ENV TERM xterm-256color
ENV COLORTERM truecolor
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'
ENV TF_DATA_DIR=/terraform-state
RUN apt-get update && apt-get install software-properties-common apt-transport-https locales curl tar unzip git procps libncurses-dev vim -y && \
locale-gen en_US.utf8 && locale -a && \
update-locale LANG=en_US.UTF-8 LANG=en_US.UTF8 LC_CTYPE=en_US.UTF8 LC_COLLATE=en_US.UTF8 && \
curl -LO "https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl" && \
chmod +x ./kubectl && \
mv ./kubectl /usr/local/bin/kubectl && \
kubectl version --client && \
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \
unzip awscliv2.zip && \
./aws/install && \
cd /tmp && curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 && \
chmod 700 get_helm.sh && \
bash get_helm.sh && \
helm repo add stable https://charts.helm.sh/stable && \
curl -fsSL https://apt.releases.hashicorp.com/gpg | apt-key add - && \
echo "deb [arch=amd64] https://apt.releases.hashicorp.com focal main" | tee /etc/apt/sources.list && \
apt-get update && apt-get install terraform=1.2.4 -y
FROM ubuntu:22.04

ARG KUBECTL_VERSION="v1.34.0"
ARG TERRAFORM_VERSION="1.13.1"
ARG HELM_VERSION="v3.15.2"
ARG TARGETARCH=amd64

ENV DEBIAN_FRONTEND=noninteractive \
LANG='en_US.UTF-8' \
LANGUAGE='en_US:en' \
LC_ALL='en_US.UTF-8'

RUN \
apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
curl \
unzip \
git \
procps \
vim-tiny \
locales \
less \
&& \
update-ca-certificates && \
\
locale-gen en_US.utf8 && \
\
# Install AWS CLI
ARCH_SUFFIX="x86_64" && \
if [ "$TARGETARCH" = "arm64" ]; then ARCH_SUFFIX="aarch64"; fi && \
curl -fL "https://awscli.amazonaws.com/awscli-exe-linux-${ARCH_SUFFIX}.zip" -o "awscliv2.zip" && \
unzip awscliv2.zip && \
./aws/install && \
\
# Install kubectl
curl -fLO "https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/${TARGETARCH}/kubectl" && \
install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl && \
\
# Install Helm
curl -fL "https://get.helm.sh/helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz" | tar -xz && \
install -o root -g root -m 0755 linux-${TARGETARCH}/helm /usr/local/bin/helm && \
\
# Install Terraform
curl -fL "https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_${TARGETARCH}.zip" -o "terraform.zip" && \
unzip -o terraform.zip -d /usr/local/bin && \
\
apt-get purge -y --auto-remove unzip && \
rm -rf \
/var/lib/apt/lists/* \
/aws/ \
awscliv2.zip \
kubectl \
helm \
linux-${TARGETARCH}/ \
terraform.zip && \
\
echo "--- Verifying Installations ---" && \
kubectl version --client && \
helm version && \
terraform --version && \
aws --version && \
echo "--- Verification Complete ---"

WORKDIR /
ENTRYPOINT ["bash"]

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,18 @@ spec:
value: /tmp/.wolframcache
- name: KAFKA.BOOTSTRAP-SERVERS
value: kafka-persistent-kafka-bootstrap.kafka.svc.cluster.local:9092
- name : API_REQUEST_TOPIC
- name: API_REQUEST_TOPIC
value: "api-request"
- name : RESOURCE_INFO_TOPIC
- name: RESOURCE_INFO_TOPIC
value: "resource-info"
- name : NODEFILE_INFO_TOPIC
- name: NODEFILE_INFO_TOPIC
value: "nodefile-info"
- name : ENDPOINT_INFO_TOPIC
- name: ENDPOINT_INFO_TOPIC
value: "endpoint-info"
- name: API_RESPONSE_TOPIC
value: "api-response"
- name: applicationserver.nodefiles.cachedirectory
value: /opt/.wolframcache/nodefiles/
- name: applicationserver.version
value: "3.3.9"
- name: applicationserver.wolframEngineVersion
value: "14.0.0"
- name: applicationserver.kernelinitializationfile.name
value: init.m
- name: poolconfiguration_kernelpool_0__KernelNumber
Expand Down Expand Up @@ -83,28 +79,23 @@ spec:
requests:
cpu: 2
memory: 6Gi
startupProbe:
httpGet:
path: /.applicationserver/info
port: 8080
initialDelaySeconds: 15
periodSeconds: 20
failureThreshold: 10
readinessProbe:
httpGet:
path: /.applicationserver/info
port: 8080
initialDelaySeconds: 15
periodSeconds: 20
livenessProbe:
httpGet:
path: /.applicationserver/info
port: 8080
initialDelaySeconds: 15
periodSeconds: 20
# startupProbe:
# httpGet:
# path: /.applicationserver/kernel/readiness
# port: 8080
# initialDelaySeconds: 15
# periodSeconds: 10
# failureThreshold: 100
# livenessProbe:
# failureThreshold: 3
# httpGet:
# path: '/.applicationserver/kernel/stats?require-running-kernels=true'
# port: 8080
# initialDelaySeconds: 20
# periodSeconds: 20
# successThreshold: 1
# timeoutSeconds: 1
volumeMounts:
- mountPath: "/opt/.wolframcache/nodefiles/"
name: awes-nodefiles-storage
- mountPath: "/opt/app/logs"
name: awes-logs-storage
initContainers:
Expand All @@ -115,9 +106,6 @@ spec:
image: bash
command: ["bash", "-c", "for i in $(seq 1 3000); do nc -zvw1 endpoint-manager 8085 && exit 0 || sleep 3; done; exit 1"]
volumes:
- name: awes-nodefiles-storage
persistentVolumeClaim:
claimName: awes-nodefiles
- name: awes-logs-storage
persistentVolumeClaim:
claimName: awes-logs
Loading