Split installation installation
This commit is contained in:
parent
67c19ef403
commit
b62464fa42
|
@ -0,0 +1,14 @@
|
|||
PATH=${PWD}/bin/:$PATH
|
||||
EMAIL_ADDRESS="${EMAIL_ADDRESS:-kubernetesadmin@example.org}"
|
||||
KUBECTL_BIN="${KUBECTL_BIN:-kubectl}"
|
||||
INSTALL_DIR="${INSTALL_DIR:-$(pwd)/bin}"
|
||||
HELM_BIN="${INSTALL_DIR}/helm"
|
||||
ARGOCD_BIN="${INSTALL_DIR}/argocd"
|
||||
|
||||
|
||||
export PATH \
|
||||
EMAIL_ADDRESS \
|
||||
KUBECTL_BIN \
|
||||
INSTALL_DIR \
|
||||
HELM_BIN \
|
||||
ARGOCD_BIN
|
|
@ -0,0 +1,24 @@
|
|||
#!/usr/bin/bash
|
||||
|
||||
source env
|
||||
source logger.sh
|
||||
|
||||
function install_cert_manager {
|
||||
${KUBECTL_BIN} create namespace cert-manager
|
||||
${HELM_BIN} repo add jetstack https://charts.jetstack.io
|
||||
${HELM_BIN} repo update
|
||||
${HELM_BIN} install cert-manager jetstack/cert-manager \
|
||||
--namespace cert-manager \
|
||||
--version v1.6.1 \
|
||||
--set installCRDs=true
|
||||
}
|
||||
|
||||
function create_cluster_issuer {
|
||||
sed "s/EMAIL_ADDRESS/${EMAIL_ADDRESS}/" cluster_issuer.yaml | ${KUBECTL_BIN} apply -f -
|
||||
}
|
||||
|
||||
log_info "Installing cert manager..."
|
||||
install_cert_manager
|
||||
create_cluster_issuer
|
||||
|
||||
log_info "Installation completed successfuly!"
|
32
install.sh
32
install.sh
|
@ -1,17 +1,7 @@
|
|||
#!/usr/bin/bash
|
||||
|
||||
EMAIL_ADDRESS="${EMAIL_ADDRESS:-kubernetesadmin@example.org}"
|
||||
KUBECTL_BIN="${KUBECTL_BIN:-kubectl}"
|
||||
INSTALL_DIR="${INSTALL_DIR:-$(pwd)/bin}"
|
||||
HELM_BIN="${INSTALL_DIR}/helm"
|
||||
ARGOCD_BIN="${INSTALL_DIR}/argocd"
|
||||
|
||||
blue_color="\e[34m"
|
||||
reset_color="\e[0m"
|
||||
|
||||
function log_info {
|
||||
printf "%b%s%b\n" "${blue_color}" "${1}" "${reset_color}"
|
||||
}
|
||||
source env
|
||||
source logger.sh
|
||||
|
||||
function install_helm {
|
||||
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 \
|
||||
|
@ -25,20 +15,6 @@ function install_nginx_ingress_controller {
|
|||
--set controller.publishService.enabled=true
|
||||
}
|
||||
|
||||
function install_cert_manager {
|
||||
${KUBECTL_BIN} create namespace cert-manager
|
||||
${HELM_BIN} repo add jetstack https://charts.jetstack.io
|
||||
${HELM_BIN} repo update
|
||||
${HELM_BIN} install cert-manager jetstack/cert-manager \
|
||||
--namespace cert-manager \
|
||||
--version v1.2.0 \
|
||||
--set installCRDs=true
|
||||
}
|
||||
|
||||
function create_cluster_issuer {
|
||||
sed "s/EMAIL_ADDRESS/${EMAIL_ADDRESS}/" cluster_issuer.yaml | ${KUBECTL_BIN} apply -f -
|
||||
}
|
||||
|
||||
function install_argocd_full {
|
||||
${KUBECTL_BIN} create namespace argocd
|
||||
${KUBECTL_BIN} apply \
|
||||
|
@ -63,10 +39,6 @@ install_helm
|
|||
log_info "Installing NGINX ingress controller..."
|
||||
install_nginx_ingress_controller
|
||||
|
||||
log_info "Installing cert manager..."
|
||||
install_cert_manager
|
||||
create_cluster_issuer
|
||||
|
||||
log_info "Installing Argo CD..."
|
||||
install_argocd_full
|
||||
|
||||
|
|
Loading…
Reference in New Issue