Skip to content

Commit

Permalink
updated name
Browse files Browse the repository at this point in the history
  • Loading branch information
joelwembo committed May 30, 2024
1 parent 7ef3743 commit 73e97f7
Show file tree
Hide file tree
Showing 21 changed files with 76 additions and 76 deletions.
4 changes: 2 additions & 2 deletions .env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SERVER=https://cloudapp.io
SERVER=https://prodxcloud.io
DEBUG=True
SECRET_KEY=S3cr3t_K#Key77666345001
DJANGO_SECRET_KEY=%jjnu7=54g6s%qjfnhbpw0zeoei=$!her*y(p%!&84rs$4l85io
Expand All @@ -10,7 +10,7 @@ POSTGRES_NAME=DB4
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
POSTGRES_PORT=5432
POSTGRES_HOST=cloudapp-django-postgresdb
POSTGRES_HOST=prodxcloud-django-postgresdb
# POSTGRES_HOST=host.docker.internal
# POSTGRES_HOST=localhost

Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
# context: ./
# push: true
# dockerfile: ./Dockerfile
# tags: joelwembo/cloudapp-django-web:latest
# tags: joelwembo/prodxcloud-django-web:latest

# deploy-to-aws-ec2:
# needs: build-and-push
Expand All @@ -101,14 +101,14 @@
# chmod 600 prodxsecure.pem
# - name: Pull Docker image
# run: |
# ssh -o StrictHostKeyChecking=no -i prodxsecure.pem [email protected] 'sudo docker pull joelwembo/cloudapp-django-web:latest'
# ssh -o StrictHostKeyChecking=no -i prodxsecure.pem [email protected] 'sudo docker pull joelwembo/prodxcloud-django-web:latest'
# - name: Stop running container
# run: |
# ssh -o StrictHostKeyChecking=no -i prodxsecure.pem [email protected] 'sudo docker stop cloudapp-django-web || true'
# ssh -o StrictHostKeyChecking=no -i prodxsecure.pem [email protected] 'sudo docker rm cloudapp-django-web || true'
# ssh -o StrictHostKeyChecking=no -i prodxsecure.pem [email protected] 'sudo docker stop prodxcloud-django-web || true'
# ssh -o StrictHostKeyChecking=no -i prodxsecure.pem [email protected] 'sudo docker rm prodxcloud-django-web || true'
# - name: Run new container
# run: |
# ssh -o StrictHostKeyChecking=no -i prodxsecure.pem [email protected] 'sudo docker run -d --name cloudapp -p 8585:8585 joelwembo/cloudapp-django-web:latest'
# ssh -o StrictHostKeyChecking=no -i prodxsecure.pem [email protected] 'sudo docker run -d --name prodxcloud -p 8585:8585 joelwembo/prodxcloud-django-web:latest'



Expand All @@ -124,7 +124,7 @@

# jobs:
# test_django_job:
# uses: joelwembo/cloudapp-django/.github/workflows/test-django.yaml@master
# uses: joelwembo/prodxcloud-django/.github/workflows/test-django.yaml@master
# build:
# runs-on: ubuntu-latest
# needs: [test_django_job]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-django.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@
# context: ./
# # Note: tags has to be all lower-case
# tags: |
# joelwembo/cloudapp-engine-django:${{ github.sha }}
# ghcr.io/joelwembo/cloudapp-engine-django:${{ github.sha }}
# joelwembo/prodxcloud-engine-django:${{ github.sha }}
# ghcr.io/joelwembo/prodxcloud-engine-django:${{ github.sha }}
# # build on feature branches, push only on main branch
# push: ${{ github.ref == 'refs/heads/master' }}

16 changes: 8 additions & 8 deletions apps/templates/home/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
<title>cloudapp</title>
<title>prodxcloud</title>
</head>
<body>
<nav class="navbar bg-body-tertiary" style="">
<div class="container-fluid">
<a class="navbar-brand" href="#">
<img src="https://cloudapp.com/assets/images/logo/logo-cloudapp-dark.png" alt="Logo" width="100" height="50" class="d-inline-block align-text-top">
<img src="https://prodxcloud.com/assets/images/logo/logo-prodxcloud-dark.png" alt="Logo" width="100" height="50" class="d-inline-block align-text-top">

</a>
</div>
Expand All @@ -24,13 +24,13 @@
<div class="container">
<footer class="py-3 my-4">
<ul class="nav justify-content-center border-bottom pb-3 mb-3">
<li class="nav-item"><a href="https://cloudapp.com/" class="nav-link px-2 text-muted">Home</a></li>
<li class="nav-item"><a href="https://cloudapp.com/" class="nav-link px-2 text-muted">Features</a></li>
<li class="nav-item"><a href="https://cloudapp.com/" class="nav-link px-2 text-muted">Pricing</a></li>
<li class="nav-item"><a href="https://cloudapp.com/" class="nav-link px-2 text-muted">FAQs</a></li>
<li class="nav-item"><a href="https://cloudapp.com/" class="nav-link px-2 text-muted">About</a></li>
<li class="nav-item"><a href="https://prodxcloud.com/" class="nav-link px-2 text-muted">Home</a></li>
<li class="nav-item"><a href="https://prodxcloud.com/" class="nav-link px-2 text-muted">Features</a></li>
<li class="nav-item"><a href="https://prodxcloud.com/" class="nav-link px-2 text-muted">Pricing</a></li>
<li class="nav-item"><a href="https://prodxcloud.com/" class="nav-link px-2 text-muted">FAQs</a></li>
<li class="nav-item"><a href="https://prodxcloud.com/" class="nav-link px-2 text-muted">About</a></li>
</ul>
<p class="text-center text-muted">&copy; 2022 cloudapp, Inc</p>
<p class="text-center text-muted">&copy; 2022 prodxcloud, Inc</p>
</footer>
</div>
</body>
Expand Down
14 changes: 7 additions & 7 deletions deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
kind: Deployment
apiVersion: apps/v1
metadata:
name: cloudapp-django-web
name: prodxcloud-django-web
spec:
replicas: 2
selector:
matchLabels:
app: cloudapp-django-web
app: prodxcloud-django-web
template:
metadata:
labels:
app: cloudapp-django-web
app: prodxcloud-django-web
spec:
containers:
- name: cloudapp-django-web
image: joelwembo/cloudapp-django-web:latest
- name: prodxcloud-django-web
image: joelwembo/prodxcloud-django-web:latest
resources:
limits:
memory: 200Mi
Expand All @@ -30,7 +30,7 @@ kind: Service
metadata:
name: load-balancer
labels:
app: cloudapp-django-web
app: prodxcloud-django-web
spec:
type: LoadBalancer
ports:
Expand All @@ -39,4 +39,4 @@ spec:
protocol: TCP
nodePort: 31009
selector:
app: cloudapp-django-web
app: prodxcloud-django-web
16 changes: 8 additions & 8 deletions deployments/Jenkins/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pipeline{
steps {
// sh 'docker-compose down'
// sh 'docker-compose build --no-cache'
sh 'docker build -t joelwembo/cloudapp-django-web:latest --no-cache .'
sh 'docker build -t joelwembo/prodxcloud-django-web:latest --no-cache .'
}
}
stage('Login') {
Expand All @@ -55,15 +55,15 @@ pipeline{

stage('Trivy Scan') {
steps {
sh 'trivy image joelwembo/cloudapp-django-web:latest'
sh 'trivy image joelwembo/prodxcloud-django-web:latest'
}
}

stage('Docker Push') {
steps {
sh 'docker images'
sh 'docker images --filter "reference=cloudapp-django-web*"'
sh 'docker push joelwembo/cloudapp-django-web:latest'
sh 'docker images --filter "reference=prodxcloud-django-web*"'
sh 'docker push joelwembo/prodxcloud-django-web:latest'
}
}
stage('Run the Application'){
Expand All @@ -85,13 +85,13 @@ pipeline{
// sh 'kubectl config use-context minikube'
// sh 'kubectl cluster-info'
// dir('deployments/k8s') {
// sh 'kubectl delete namespace cloudapp-django-web'
// sh 'kubectl create namespace cloudapp-django-web'
// sh 'kubectl config set-context --current --namespace=cloudapp-django-web'
// sh 'kubectl delete namespace prodxcloud-django-web'
// sh 'kubectl create namespace prodxcloud-django-web'
// sh 'kubectl config set-context --current --namespace=prodxcloud-django-web'
// sh 'kubectl apply -f deployment.yaml'
// }
// sh 'kubectl get services && kubectl get pods'
// sh 'minikube service cloudapp-django-web -n cloudapp-django-web &'
// sh 'minikube service prodxcloud-django-web -n prodxcloud-django-web &'
// sh 'exit 0'
// }
// }
Expand Down
8 changes: 4 additions & 4 deletions deployments/Jenkins/Jenkinsfile-SonarQube-Trivy-Scan
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pipeline{
stage('Build'){
steps {

sh 'docker build -t joelwembo/cloudapp-django-web:latest --no-cache .'
sh 'docker build -t joelwembo/prodxcloud-django-web:latest --no-cache .'
}
}
stage('Login') {
Expand All @@ -55,15 +55,15 @@ pipeline{

stage('Trivy Scan') {
steps {
sh 'trivy image joelwembo/cloudapp-django-web:latest'
sh 'trivy image joelwembo/prodxcloud-django-web:latest'
}
}

stage('Docker Push') {
steps {
sh 'docker images'
// sh 'docker images --filter "reference=cloudapp-django-web*"'
// sh 'docker push joelwembo/cloudapp-django-web:latest'
// sh 'docker images --filter "reference=prodxcloud-django-web*"'
// sh 'docker push joelwembo/prodxcloud-django-web:latest'
}
}
stage('Run the Application'){
Expand Down
2 changes: 1 addition & 1 deletion deployments/Jenkins/JenkinsfileEKS
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pipeline {
DOCKER_REGISTRY_URL = 'docker.io'
EKS_CLUSTER_NAME = 'mycluster'
EKS_NAMESPACE = 'default'
APP_NAME = 'joelwembo/cloudapp-django-web'
APP_NAME = 'joelwembo/prodxcloud-django-web'
DOCKER_IMAGE_TAG = 'latest'
}

Expand Down
2 changes: 1 addition & 1 deletion deployments/Jenkins/JenkinsfileTemplate
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ pipeline{

stage('trivy Scan') {
steps {
sh 'trivy joelwembo/cloudapp-django-web:latest'
sh 'trivy joelwembo/prodxcloud-django-web:latest'
}
}

Expand Down
8 changes: 4 additions & 4 deletions deployments/deploy-aws-eks-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

# Variables
KUBECONFIG="/root/.kube/config"
NAMESPACE="cloudapp-django-web"
DOCKER_IMAGE="joelwembo/cloudapp-django-web:latest"
DEPLOYMENT_NAME="cloudapp-django-web"
NAMESPACE="prodxcloud-django-web"
DOCKER_IMAGE="joelwembo/prodxcloud-django-web:latest"
DEPLOYMENT_NAME="prodxcloud-django-web"
SERVICE_NAME="mycluster"
PORT=8585

Expand All @@ -18,4 +18,4 @@ kubectl apply -f deployments/k8s/deployment.yaml
kubectl set image deployment/$DEPLOYMENT_NAME $DEPLOYMENT_NAME=$DOCKER_IMAGE -n $NAMESPACE

# Expose the deployment as a service
kubectl expose deployment $DEPLOYMENT_NAME --type=LoadBalancer --port=80 --target-port=$PORT -n $NAMESPACE --name=cloudapp-django-web
kubectl expose deployment $DEPLOYMENT_NAME --type=LoadBalancer --port=80 --target-port=$PORT -n $NAMESPACE --name=prodxcloud-django-web
14 changes: 7 additions & 7 deletions deployments/k8s/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
kind: Deployment
apiVersion: apps/v1
metadata:
name: cloudapp-django-web
name: prodxcloud-django-web
spec:
replicas: 2
selector:
matchLabels:
app: cloudapp-django-web
app: prodxcloud-django-web
template:
metadata:
labels:
app: cloudapp-django-web
app: prodxcloud-django-web
spec:
containers:
- name: cloudapp-django-web
image: joelwembo/cloudapp-django-web:latest
- name: prodxcloud-django-web
image: joelwembo/prodxcloud-django-web:latest
resources:
limits:
memory: 200Mi
Expand All @@ -30,7 +30,7 @@ kind: Service
metadata:
name: load-balancer
labels:
app: cloudapp-django-web
app: prodxcloud-django-web
spec:
type: LoadBalancer
ports:
Expand All @@ -39,4 +39,4 @@ spec:
protocol: TCP
nodePort: 31009
selector:
app: cloudapp-django-web
app: prodxcloud-django-web
4 changes: 2 additions & 2 deletions deployments/k8s/load-balancer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: Service
metadata:
name: load-balancer
labels:
app: web_cloudapp_django
app: web_prodxcloud_django
spec:
type: LoadBalancer
ports:
Expand All @@ -12,4 +12,4 @@ spec:
protocol: TCP
nodePort: 31009
selector:
app: web_cloudapp_django
app: web_prodxcloud_django
2 changes: 1 addition & 1 deletion deployments/scripts/celery-Watch-beats.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
docker exec -it web_cloudapp_django celery -A multitenantsaas beat -l INFO --logfile=celery.log
docker exec -it web_prodxcloud_django celery -A multitenantsaas beat -l INFO --logfile=celery.log
2 changes: 1 addition & 1 deletion deployments/scripts/celery-flower.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
docker exec -it cloudapp-django-web celery -A multitenantsaas flower --port=5555
docker exec -it prodxcloud-django-web celery -A multitenantsaas flower --port=5555
4 changes: 2 additions & 2 deletions deployments/scripts/celery-watch-logs.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
docker exec -it cloudapp-django_celery_1 celery -A multitenantsaas worker -l INFO
docker exec -it prodxcloud-django_celery_1 celery -A multitenantsaas worker -l INFO

docker exec -it cloudapp-django_celery_1 celery -A multitenantsaas worker -l info --beat
docker exec -it prodxcloud-django_celery_1 celery -A multitenantsaas worker -l info --beat
6 changes: 3 additions & 3 deletions deployments/scripts/createsuperuser.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

docker exec -it cloudapp-django-web python manage.py makemigrations
docker exec -it cloudapp-django-web python manage.py migrate
docker exec -it prodxcloud-django-web python manage.py makemigrations
docker exec -it prodxcloud-django-web python manage.py migrate

docker exec -it cloudapp-django-web python manage.py createsuperuser
docker exec -it prodxcloud-django-web python manage.py createsuperuser

2 changes: 1 addition & 1 deletion deployments/scripts/django-shell.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
docker exec -it web_cloudapp_django python manage.py shell
docker exec -it web_prodxcloud_django python manage.py shell

tenant = Client(schema_name="app1", name="app1")

Expand Down
2 changes: 1 addition & 1 deletion deployments/scripts/docker-shell.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
docker exec -it cloudapp-django-postgresdb bash
docker exec -it prodxcloud-django-postgresdb bash
4 changes: 2 additions & 2 deletions deployments/scripts/migrate.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
docker exec -it web_cloudapp_django python manage.py makemigrations
docker exec -it web_cloudapp_django python manage.py migrate
docker exec -it web_prodxcloud_django python manage.py makemigrations
docker exec -it web_prodxcloud_django python manage.py migrate
echo 'Production Migration Operation Completed , Please Check the logs status'
Loading

0 comments on commit 73e97f7

Please sign in to comment.