Skip to content

Commit bcde640

Browse files
sunil-paridaPalashGoelIntelgarylougsys-orch
authored
emf onprem simplification (#939)
Co-authored-by: Palash Goel <[email protected]> Co-authored-by: Gary Loughnane <[email protected]> Co-authored-by: sys-orch <[email protected]>
1 parent 4ace36f commit bcde640

File tree

23 files changed

+1893
-918
lines changed

23 files changed

+1893
-918
lines changed

.github/workflows/virtual-integration.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -818,7 +818,10 @@ jobs:
818818
TF_VAR_no_proxy: "localhost,127.0.0.0/8,10.0.0.0/8,192.168.0.0/16,.svc,.cluster.local,.default,.internal,.orch-platform,.orch-app,.orch-cluster,.orch-infra,.orch-database,.cattle-system,.orch-secret,.onprem"
819819
TF_VAR_en_http_proxy: "http://192.168.99.30:8080"
820820
TF_VAR_en_https_proxy: "http://192.168.99.30:8080"
821-
TF_VAR_overwrite_profiles: '[["profile-oxm", "argo:\n infra-onboarding:\n pxe-server:\n interface: \"orchnet\"\n bootServerIP: \"192.168.99.20\"\n subnetAddress: \"192.168.99.0\""]]'
821+
TF_VAR_oxm_pxe_server_int: "orchnet"
822+
TF_VAR_oxm_pxe_server_ip: "192.168.99.20"
823+
TF_VAR_oxm_pxe_server_subnet: "192.168.99.0"
824+
TF_VAR_enable_explicit_proxy: "true"
822825
with:
823826
orch_version: ${{ github.event.pull_request.head.sha }}
824827
orch_profile: onprem-oxm

installer/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ ARG DEPLOY_TYPE
6464
ENV DEBIAN_FRONTEND=noninteractive DEPLOY_TYPE=$DEPLOY_TYPE SSHUTTLE_ARGS="--disable-ipv6" USER=root
6565

6666
COPY Makefile configure-cluster.sh initialize-gitops-repos.sh start-tunnel.sh utils.sh await-argo.sh \
67-
prepare-upgrade.sh update-cluster.sh query-git-user.sh get-argo-login.sh cluster.tpl \
67+
prepare-upgrade.sh update-cluster.sh query-git-user.sh get-argo-login.sh cluster_aws.tpl generate_cluster_yaml.sh \
68+
reconnect-aws-cluster.sh \
6869
./
6970
ADD $DEPLOY_TARBALL .
7071
ADD $POD_CONFIGS_TARBALL .

installer/cluster_aws.tpl

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# SPDX-FileCopyrightText: 2025 Intel Corporation
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
# Cluster specific values applied to root-app only
6+
root:
7+
useLocalValues: true
8+
clusterValues:
9+
- orch-configs/profiles/enable-platform.yaml
10+
${O11Y_ENABLE_PROFILE}
11+
- orch-configs/profiles/enable-kyverno.yaml
12+
${AO_PROFILE}
13+
${CO_PROFILE}
14+
${EDGEINFRA_PROFILE}
15+
- orch-configs/profiles/enable-full-ui.yaml
16+
- orch-configs/profiles/enable-aws.yaml
17+
${SRE_PROFILE}
18+
- orch-configs/profiles/proxy-none.yaml
19+
- orch-configs/profiles/profile-aws.yaml
20+
- orch-configs/profiles/resource-default.yaml
21+
${AWS_PROD_PROFILE}
22+
${O11Y_PROFILE}
23+
${SINGLE_TENANCY_PROFILE}
24+
${EMAIL_PROFILE}
25+
${AUTOCERT_PROFILE}
26+
- orch-configs/profiles/artifact-rs-production-noauth.yaml
27+
- orch-configs/clusters/${CLUSTER_NAME}.yaml
28+
# Values applied to both root app and shared among all child apps
29+
argo:
30+
## Basic cluster information
31+
project: ${CLUSTER_NAME}
32+
namespace: ${CLUSTER_NAME}
33+
clusterName: ${CLUSTER_NAME}
34+
clusterDomain: ${CLUSTER_FQDN}
35+
adminEmail: ${ADMIN_EMAIL}
36+
37+
deployRepoURL: https://gitea.${CLUSTER_FQDN}/argocd/edge-manageability-framework
38+
deployRepoRevision: main
39+
40+
git:
41+
server: https://gitea.${CLUSTER_FQDN}
42+
43+
targetServer: "https://kubernetes.default.svc"
44+
autosync: true
45+
46+
o11y:
47+
# If the cluster has a node dedicated to edgenode observability services
48+
dedicatedEdgenodeEnabled: true
49+
50+
## AWS Account Info
51+
aws:
52+
account: "${AWS_ACCOUNT}"
53+
region: ${AWS_REGION}
54+
bucketPrefix: ${CLUSTER_NAME}-${S3_PREFIX}
55+
efs:
56+
repository: 602401143452.dkr.ecr.${AWS_REGION}.amazonaws.com/eks/aws-efs-csi-driver
57+
fsid: "${FILE_SYSTEM_ID}"
58+
targetGroup:
59+
traefik: "${TRAEFIK_TG_ARN}"
60+
traefikGrpc: "${TRAEFIKGRPC_TG_ARN}"
61+
# nginx: "${NGINX_TG_ARN}"
62+
argocd: "${ARGOCD_TG_ARN}"
63+
64+
traefik:
65+
tlsOption: ""
66+
67+
orchestratorDeployment:
68+
targetCluster: cloud
69+
70+
postCustomTemplateOverwrite: {}

installer/configure-cluster.sh

Lines changed: 11 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ parse_params "$@"
5959

6060
load_cluster_state_env
6161
check_provision_env -p
62-
load_provision_values
6362
save_cluster_env
6463

6564
load_cluster_state_env
@@ -68,100 +67,25 @@ if ! load_scm_auth; then
6867
fi
6968
save_scm_auth
7069

71-
update_kube_config
72-
7370
#
7471
# Create Cluster Configuration
7572
#
76-
export FILE_SYSTEM_ID=$(aws efs --region ${AWS_REGION} describe-file-systems --query "FileSystems[?Name == '${CLUSTER_NAME}'].FileSystemId" --output text)
77-
export S3_PREFIX=$(get_s3_prefix)
78-
79-
export TRAEFIK_TG_HASH=$(echo -n "${CLUSTER_NAME}-traefik-default" | sha256sum | cut -c-32)
80-
export TRAEFIKGRPC_TG_HASH=$(echo -n "${CLUSTER_NAME}-traefik-grpc" | sha256sum | cut -c-32)
81-
export NGINX_TG_HASH=$(echo -n "${CLUSTER_NAME}-traefik2-https" | sha256sum | cut -c-32)
82-
export ARGOCD_TG_HASH=$(echo -n "${CLUSTER_NAME}-argocd-default" | sha256sum | cut -c-32)
83-
84-
export TRAEFIK_TG_ARN=$(aws elbv2 describe-target-groups --names ${TRAEFIK_TG_HASH} | jq -r '.TargetGroups[].TargetGroupArn')
85-
if [ -z $TRAEFIK_TG_ARN ]; then
86-
export TRAEFIK_TG_ARN=$(aws elbv2 describe-target-groups --names ${CLUSTER_NAME}-traefik-https | jq -r '.TargetGroups[].TargetGroupArn')
87-
fi
88-
if [ -z $TRAEFIK_TG_ARN ]; then
89-
echo " error: Load balancer Target Group for ${CLUSTER_NAME} not found."
73+
if [ -z "$FILE_SYSTEM_ID" ] || [ -z "$TRAEFIK_TG_ARN" ] || [ -z "$ARGOCD_TG_ARN" ]; then
74+
echo " Missing one or more of: FILE_SYSTEM_ID, TRAEFIK_TG_ARN, ARGOCD_TG_ARN"
75+
echo " Please run provision.sh first."
9076
exit 1
9177
fi
9278

93-
export TRAEFIKGRPC_TG_ARN=$(aws elbv2 describe-target-groups --names ${TRAEFIKGRPC_TG_HASH} | jq -r '.TargetGroups[].TargetGroupArn')
94-
export NGINX_TG_ARN=$(aws elbv2 describe-target-groups --names ${NGINX_TG_HASH} | jq -r '.TargetGroups[].TargetGroupArn')
95-
export ARGOCD_TG_ARN=$(aws elbv2 describe-target-groups --names ${ARGOCD_TG_HASH} | jq -r '.TargetGroups[].TargetGroupArn')
96-
if [ -z $ARGOCD_TG_ARN ]; then
97-
export ARGOCD_TG_ARN=$(aws elbv2 describe-target-groups --names ${CLUSTER_NAME}-argocd-https | jq -r '.TargetGroups[].TargetGroupArn')
98-
fi
99-
100-
101-
# AO_PROFILE disabled check
102-
if [ "${DISABLE_CO_PROFILE:-false}" = "true" ] || [ "${DISABLE_AO_PROFILE:-false}" = "true" ]; then
103-
export AO_PROFILE="#- orch-configs/profiles/enable-app-orch.yaml"
104-
else
105-
export AO_PROFILE="- orch-configs/profiles/enable-app-orch.yaml"
106-
fi
107-
108-
# CO_PROFILE disabled check
109-
if [ "${DISABLE_CO_PROFILE:-false}" = "true" ]; then
110-
export CO_PROFILE="#- orch-configs/profiles/enable-cluster-orch.yaml"
111-
export AO_PROFILE="#- orch-configs/profiles/enable-app-orch.yaml"
112-
else
113-
export CO_PROFILE="- orch-configs/profiles/enable-cluster-orch.yaml"
114-
fi
115-
116-
if [ -n "$SRE_BASIC_AUTH_USERNAME" ] || [ -n "$SRE_BASIC_AUTH_PASSWORD" ] || [ -n "$SRE_DESTINATION_SECRET_URL" ] || [ -n "$SRE_DESTINATION_CA_SECRET" ]; then
117-
export SRE_PROFILE="- orch-configs/profiles/enable-sre.yaml"
118-
else
119-
export SRE_PROFILE="#- orch-configs/profiles/enable-sre.yaml"
120-
fi
121-
122-
if [ -z $SINGLE_TENANCY ]; then
123-
export SINGLE_TENANCY_PROFILE="#- orch-configs/profiles/enable-singleTenancy.yaml"
124-
else
125-
export SINGLE_TENANCY_PROFILE="- orch-configs/profiles/enable-singleTenancy.yaml"
126-
fi
127-
128-
if [ "${DISABLE_O11Y:-false}" = "true" ]; then
129-
export O11Y_ENABLE_PROFILE="#- orch-configs/profiles/enable-o11y.yaml"
130-
else
131-
export O11Y_ENABLE_PROFILE="- orch-configs/profiles/enable-o11y.yaml"
132-
fi
79+
export FILE_SYSTEM_ID
80+
export TRAEFIK_TG_ARN
81+
export TRAEFIKGRPC_TG_ARN
82+
export NGINX_TG_ARN
83+
export ARGOCD_TG_ARN
84+
export S3_PREFIX
13385

134-
if [ -z $SMTP_URL ]; then
135-
export EMAIL_PROFILE="#- orch-configs/profiles/alerting-emails.yaml"
136-
else
137-
export EMAIL_PROFILE="- orch-configs/profiles/alerting-emails.yaml"
138-
fi
86+
source ./generate_cluster_yaml.sh aws
13987

140-
if [ -z $AUTO_CERT ]; then
141-
export AUTOCERT_PROFILE="#- orch-configs/profiles/profile-autocert.yaml"
142-
else
143-
export AUTOCERT_PROFILE="- orch-configs/profiles/profile-autocert.yaml"
144-
fi
145-
146-
export AWS_PROD_PROFILE="- orch-configs/profiles/profile-aws-production.yaml"
147-
if [[ "$DISABLE_AWS_PROD_PROFILE" == "true" ]]; then
148-
export AWS_PROD_PROFILE="#- orch-configs/profiles/profile-aws-production.yaml"
149-
fi
150-
151-
if [ "${DISABLE_O11Y:-false}" = "true" ]; then
152-
export O11Y_PROFILE="#- orch-configs/profiles/o11y-release.yaml"
153-
else
154-
export O11Y_PROFILE="- orch-configs/profiles/o11y-release.yaml"
155-
if [[ "$CLUSTER_SCALE_PROFILE" == "500en" || "$CLUSTER_SCALE_PROFILE" == "1ken" || "$CLUSTER_SCALE_PROFILE" == "10ken" ]]; then
156-
export O11Y_PROFILE="- orch-configs/profiles/o11y-release-large.yaml"
157-
fi
158-
fi
159-
160-
export CLUSTER_SCALE_PROFILE=$(grep -oP '^# Profile: "\K[^"]+' ~/pod-configs/SAVEME/${AWS_ACCOUNT}-${CLUSTER_NAME}-profile.tfvar)
161-
162-
echo
163-
echo "Creating cluster definition for ${CLUSTER_NAME}"
164-
cat cluster.tpl | envsubst > edge-manageability-framework/orch-configs/clusters/${CLUSTER_NAME}.yaml
88+
cp -rf ${CLUSTER_NAME}.yaml edge-manageability-framework/orch-configs/clusters/
16589

16690
echo
16791
echo =============================================================================

0 commit comments

Comments
 (0)