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
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
name: tekton-triggers-sa | |
--- | |
apiVersion: rbac.authorization.k8s.io/v1 | |
kind: Role | |
metadata: | |
name: tekton-triggers-example-minimal | |
rules: |
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
apiVersion: v1 | |
kind: List | |
items: | |
- apiVersion: argoproj.io/v1alpha1 | |
kind: Application | |
metadata: | |
name: argo-rollouts | |
labels: | |
type: infrastructure | |
spec: |
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
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash | |
. ~/.nvm/nvm.sh | |
nvm install node | |
node -e "console.log('Running Node.js ' + process.version)" |
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 nodejs app with gitlab.com and pm2 | |
========================================= | |
This manual is about setting up an automatic deploy workflow using [nodejs](https://nodejs.org/en/), | |
[PM2](http://pm2.keymetrics.io/), [nginx](https://nginx.org/) and | |
[GitLab CI](https://about.gitlab.com/features/gitlab-ci-cd/). It is tested on: | |
* Target server: **Ubuntu 16.04 x64.** This is suitable for Ubuntu 14.x. | |
* **Windows 10** on my PC to work. |
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
Docker: | |
*[Docker Cheatsheet](https://dockerlabs.collabnix.com/). | |
*[12 Factor Apps](https://12factor.net/). | |
*https://pagertree.com/2020/01/06/docker-cheat-sheet/ | |
*https://buddy.works/tutorials/docker-commands-cheat-sheet | |
* |
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
sudo gitlab-runner status | |
Docker-Image: docker:19.03.12 | |
sudo vim /etc/gitlab-runner/config.toml | |
privileged: ture | |
sudo apt-get install docker docker-compose -y |
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
sudo vim /etc/apache2/sites-available/000-default.conf | |
sudo vim /etc/apache2/ports.conf | |
sudo systemctl reload apache2 | |
sudo apt install nginx | |
sudo systemctl status nginx |
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
import boto3 | |
import logging | |
#setup simple logging for INFO | |
logger = logging.getLogger() | |
logger.setLevel(logging.INFO) | |
#define the connection | |
ec2 = boto3.resource('ec2', region_name='ap-south-1') |
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
import boto3 | |
import logging | |
#setup simple logging for INFO | |
logger = logging.getLogger() | |
logger.setLevel(logging.INFO) | |
#define the connection and set the region | |
ec2 = boto3.resource('ec2', region_name='ap-southeast-1') |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"ec2:StartInstances", | |
"ec2:StopInstances" | |
], | |
"Resource": "arn:aws:ec2:*:*:instance/*" |
NewerOlder