This example takes olddisk.qcow2
and resizes it into newdisk.qcow2
,
extending one of the guest's partitions to fill the extra space.
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
## Get cluster info | |
$ kubectl cluster-info | |
# Update firewalld | |
$ sudo firewall-cmd --permanent --zone=public --new-service=microk8s-api --set-description="Microk8s Control Plane API" | |
$ sudo firewall-cmd --zone=public --new-service=microk8s-api --set-description="Microk8s Control Plane API" | |
$ sudo firewall-cmd --permanent --zone=public --service=microk8s-api --add-port=16443/tcp | |
$ sudo firewall-cmd --zone=public --service=microk8s-api --add-port=16443/tcp | |
$ sudo firewall-cmd --reload |
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
# .bash_profile | |
# Get the aliases and functions | |
if [ -f ~/.bashrc ]; then | |
. ~/.bashrc | |
fi | |
# User specific environment and startup programs | |
alias k="kubectl" | |
alias microk="microk8s kubectl" |
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/python3 | |
import os | |
import json | |
tmp_file = "tmp_list.json" | |
if os.path.exists(tmp_file): | |
os.remove(tmp_file) | |
else: | |
print("Not exists") |
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
function abc() { | |
var promise = new Promise((resolve, reject) => { | |
setTimeout(() => { | |
resolve('step 1'); | |
}, 1000); | |
}); | |
return promise; | |
} | |
async function def(){ |
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-db.sql | |
DROP DATABASE IF EXISTS mydb; | |
CREATE DATABASE mydb; |
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
db.createUser( | |
{ | |
user: "fariz", | |
pwd: "admin321", | |
roles:[ | |
{ | |
role: "readWrite", | |
db: "admin" | |
} | |
] |
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
# Use postgres/example user/password credentials | |
version: '3.1' | |
services: | |
db: | |
image: postgres | |
restart: always | |
environment: | |
POSTGRES_PASSWORD: example | |
adminer: |
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-compose.yml | |
version: '3.7' | |
services: | |
jenkins: | |
image: jenkins/jenkins:lts | |
privileged: true | |
user: root | |
ports: | |
- 8083:8080 | |
- 50003:50000 |
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
name: CICD | |
on: [push,pull_request] | |
jobs: | |
push: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' | |
steps: | |
############################ |
NewerOlder