chore: add current provisioning state before migration
This commit is contained in:
parent
a9703b4748
commit
50745b0f22
660 changed files with 88126 additions and 0 deletions
19
.provisioning-extensions/taskservs/custom-app/manifest.yaml
Normal file
19
.provisioning-extensions/taskservs/custom-app/manifest.yaml
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
name: custom-app
|
||||
version: 2.1.0
|
||||
type: taskserv
|
||||
description: Custom application deployment taskserv
|
||||
requires:
|
||||
- docker
|
||||
- kubectl
|
||||
permissions:
|
||||
- container
|
||||
- kubernetes
|
||||
profiles:
|
||||
- production
|
||||
- staging
|
||||
- development
|
||||
hooks:
|
||||
pre_install: check_prerequisites.nu
|
||||
post_install: verify_deployment.nu
|
||||
author: Internal DevOps Team
|
||||
repository: https://git.internal.com/devops/custom-app-taskserv
|
||||
|
|
@ -0,0 +1,90 @@
|
|||
#!/bin/bash
|
||||
# Custom Application Installation Script (Production Profile)
|
||||
# Example taskserv extension
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
SETTINGS_FILE=${1:-""}
|
||||
SERVER_POS=${2:-0}
|
||||
TASKSERV_POS=${3:-0}
|
||||
CURRENT_DIR=${4:-$(pwd)}
|
||||
|
||||
echo "Installing Custom Application (Production Profile)"
|
||||
echo "Settings: $SETTINGS_FILE"
|
||||
echo "Server Position: $SERVER_POS"
|
||||
echo "TaskServ Position: $TASKSERV_POS"
|
||||
|
||||
# Source environment if available
|
||||
if [ -f "$PROVISIONING_WK_ENV_PATH/cmd_env" ]; then
|
||||
source "$PROVISIONING_WK_ENV_PATH/cmd_env"
|
||||
fi
|
||||
|
||||
# Example: Deploy production configuration
|
||||
echo "Deploying production application..."
|
||||
|
||||
# Check if kubectl is available
|
||||
if ! command -v kubectl &> /dev/null; then
|
||||
echo "Error: kubectl is required but not installed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if docker is available
|
||||
if ! command -v docker &> /dev/null; then
|
||||
echo "Error: docker is required but not installed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Example deployment commands
|
||||
cat << 'EOF' | kubectl apply -f -
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: custom-app-production
|
||||
namespace: production
|
||||
spec:
|
||||
replicas: 3
|
||||
selector:
|
||||
matchLabels:
|
||||
app: custom-app
|
||||
env: production
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: custom-app
|
||||
env: production
|
||||
spec:
|
||||
containers:
|
||||
- name: custom-app
|
||||
image: registry.internal.com/custom-app:production
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
env:
|
||||
- name: ENVIRONMENT
|
||||
value: "production"
|
||||
- name: DATABASE_URL
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: custom-app-secrets
|
||||
key: database-url
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: custom-app-service
|
||||
namespace: production
|
||||
spec:
|
||||
selector:
|
||||
app: custom-app
|
||||
env: production
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 8080
|
||||
type: LoadBalancer
|
||||
EOF
|
||||
|
||||
echo "Custom Application deployed successfully in production"
|
||||
|
||||
# Wait for deployment to be ready
|
||||
kubectl rollout status deployment/custom-app-production -n production --timeout=300s
|
||||
|
||||
echo "Custom Application is ready and running"
|
||||
Loading…
Add table
Add a link
Reference in a new issue