Skip to content

Commit b3ecf16

Browse files
authored
Install improvements (#508)
1 parent 6437d40 commit b3ecf16

File tree

8 files changed

+31
-9
lines changed

8 files changed

+31
-9
lines changed

cortex.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,16 @@ if [ "$arg2" != "cli" ]; then
179179
set_aws_credentials
180180
fi
181181

182+
function validate_install() {
183+
if [[ $CORTEX_NODE_TYPE == *nano ]] || [[ $CORTEX_NODE_TYPE == *micro ]] || [[ $CORTEX_NODE_TYPE == *small ]] || [[ $CORTEX_NODE_TYPE == *medium ]]; then
184+
echo -e "\nCortex does not support nano, micro, small, or medium instances - please specify a larger instance type"
185+
exit 1
186+
fi
187+
}
188+
182189
if [ "$arg1" = "install" ] && [ "$arg2" = "" ] && [ "$arg3" = "" ]; then
190+
validate_install
191+
183192
echo
184193
echo "○ cluster name: $CORTEX_CLUSTER"
185194
echo "○ region: $CORTEX_REGION"

dev/uninstall_cortex.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,12 @@ echo "Uninstalling Cortex ..."
2525

2626
kubectl delete --ignore-not-found=true namespace istio-system
2727
kubectl delete --ignore-not-found=true namespace $CORTEX_NAMESPACE
28+
kubectl delete --ignore-not-found=true -n kube-system deployment cluster-autoscaler
29+
kubectl delete --ignore-not-found=true apiservice v1beta1.metrics.k8s.io
30+
kubectl delete --ignore-not-found=true -n kube-system deployment metrics-server
31+
kubectl delete --ignore-not-found=true -n kube-system service metrics-server
32+
kubectl delete --ignore-not-found=true -n kube-system daemonset istio-cni-node
33+
kubectl delete --ignore-not-found=true -n kube-system daemonset aws-node
34+
kubectl delete --all crds
2835

2936
echo "✓ Uninstalled Cortex"

images/istio-citadel/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
FROM docker.io/istio/citadel:1.3.0
1+
FROM docker.io/istio/citadel:1.3.2

images/istio-galley/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
FROM docker.io/istio/galley:1.3.0
1+
FROM docker.io/istio/galley:1.3.2

images/istio-pilot/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
FROM docker.io/istio/pilot:1.3.0
1+
FROM docker.io/istio/pilot:1.3.2

images/istio-proxy/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
FROM docker.io/istio/proxyv2:1.3.0
1+
FROM docker.io/istio/proxyv2:1.3.2

images/manager/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ RUN curl -LO https://get.helm.sh/helm-v2.14.3-linux-amd64.tar.gz && \
2727
rm -rf linux-amd64 && \
2828
rm helm-v2.14.3-linux-amd64.tar.gz
2929

30-
RUN ISTIO_VERSION=1.3.0 && \
30+
RUN ISTIO_VERSION=1.3.2 && \
3131
curl -L "https://github.com/istio/istio/releases/download/${ISTIO_VERSION}/istio-${ISTIO_VERSION}-linux.tar.gz" | tar xz && \
3232
mkdir ./istio-manifests && \
3333
mv ./istio-${ISTIO_VERSION}/install/kubernetes/helm/* ./istio-manifests/ && \

manager/install_cortex.sh

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,10 @@ function setup_istio() {
9191
echo -n "."
9292

9393
helm template istio-manifests/istio-cni --name istio-cni --namespace kube-system | kubectl apply -f - >/dev/null
94-
echo -n "."
94+
until [ "$(kubectl get daemonset istio-cni-node -n kube-system -o 'jsonpath={.status.numberReady}')" == "$(kubectl get daemonset istio-cni-node -n kube-system -o 'jsonpath={.status.desiredNumberScheduled}')" ]; do
95+
echo -n "."
96+
sleep 5
97+
done
9598

9699
envsubst < manifests/istio-values.yaml | helm template istio-manifests/istio --values - --name istio --namespace istio-system | kubectl apply -f - >/dev/null
97100
}
@@ -172,9 +175,6 @@ function validate_cortex() {
172175

173176
eksctl utils write-kubeconfig --name=$CORTEX_CLUSTER --region=$CORTEX_REGION | grep -v "saved kubeconfig as" | grep -v "using region" || true
174177

175-
# https://docs.aws.amazon.com/eks/latest/userguide/cni-upgrades.html
176-
kubectl apply -f https://raw.githubusercontent.com/aws/amazon-vpc-cni-k8s/v1.5.3/config/v1.5/aws-k8s-cni.yaml >/dev/null
177-
178178
setup_bucket
179179
setup_cloudwatch_logs
180180

@@ -185,6 +185,12 @@ setup_secrets
185185
echo "✓ Updated cluster configuration"
186186

187187
echo -en "○ Configuring networking "
188+
# https://docs.aws.amazon.com/eks/latest/userguide/cni-upgrades.html
189+
kubectl apply -f https://raw.githubusercontent.com/aws/amazon-vpc-cni-k8s/v1.5.4/config/v1.5/aws-k8s-cni.yaml >/dev/null
190+
until [ "$(kubectl get daemonset aws-node -n kube-system -o 'jsonpath={.status.updatedNumberScheduled}')" == "$(kubectl get daemonset aws-node -n kube-system -o 'jsonpath={.status.desiredNumberScheduled}')" ]; do
191+
echo -n "."
192+
sleep 5
193+
done
188194
setup_istio
189195
envsubst < manifests/apis.yaml | kubectl apply -f - >/dev/null
190196
echo -e "\n✓ Configured networking"

0 commit comments

Comments
 (0)