This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# upload the app docker image to AWS ECR | |
push_to_AWS_ECR: | |
name: Deploy docker image to AWS ECR | |
runs-on: ubuntu-latest | |
# run this job only if the app build and test successfully | |
needs: [build_test] | |
steps: | |
- name: Checkout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
! /bin/sh | |
# -----------------------------------------------------------------------* | |
# use this block when dveelopement your app locally on your laptop | |
# uncomment this section for local host testing only. | |
# Make surre to comment this out before pushing the code | |
# to your source code management repo | |
# export HOME=./ | |
# node=$HOME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
. | |
. | |
. | |
<!-- | |
if you'd like to run Jenkins with a specific version of Java, specify a full path to java.exe. | |
The following value assumes that you have java in your PATH. | |
--> | |
<!--<executable>D:\OpenJDK\javapath\bin\java.exe</executable>--> | |
<executable>"C:\Program Files\Eclipse Adoptium\jdk-11.0.15.10-hotspot\bin\java.exe"</executable> | |
<!-- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
now=$(date) | |
BACKUPS_DIR="/location where my backup log files are stored" | |
# create log file | |
touch $BACKUPS_DIR/backup_delete.log | |
echo "Date: $now" > $BACKUPS_DIR/backup_delete.log | |
# declare static Array of file names | |
file_names=('backup_*.tgz' 'backup_file2*.log' 'log_file*.log') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this workflow job is used to automate provision of servers and resources | |
# for Google Cloud Project with terraform | |
# author: Yann Mulonda | |
name: 'Terraform' | |
on: | |
push: | |
branches: | |
- terraform |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
deploy_to_google_cloud: | |
name: Deploy to Google Cloud Platform | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout repo | |
uses: actions/checkout@v2 | |
# Setup gcloud CLI | |
- name: setup gcloud CLI | |
uses: google-github-actions/setup-gcloud@master | |
with: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -------------------------------------------------------------* | |
# Configure the Google Cloud provider | |
# -------------------------------------------------------------* | |
# The provider “google” line indicates that you are using the | |
# Google Cloud Terraform provider. To prevent automatic upgrades | |
# to new major versions that may contain breaking changes, | |
# it is recommended to add version = "..." constraints to the | |
# corresponding provider blocks in configuration | |
provider "google" { | |
# version = "~> 3.77.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -------------------------------------------------------------* | |
# Create and config Kubernetes cluster | |
# -------------------------------------------------------------* | |
# This will created the Kubernetes cluster and nodes in GCP | |
resource "google_container_cluster" "primary" { | |
name = "node-demo-k8s" # cluster name | |
location = "us-central1-c" | |
initial_node_count = 4 # number of node (VMs) for the cluster | |
# Google recommends custom service accounts that have cloud-platform | |
# scope and permissions granted via IAM Roles. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a basic workflow to help you get started with Actions | |
name: CI-CD | |
# Controls when the action will run. | |
on: | |
# Triggers the workflow on push or pull request events but only for the main branch | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
# Allows you to run this workflow manually from the Actions tab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# check out all Kubernetes commands here: | |
# https://kubernetes.io/docs/reference/kubectl/cheatsheet/ | |
# -----------------------------------------------------------* | |
# implies the use of kubernetes 1.7 | |
# use apps/v1beta2 for kubernetes 1.8 | |
# -----------------------------------------------------------* | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: nodej-demo-app |
NewerOlder