This file contains hidden or 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
| pragma solidity ^0.5.0; | |
| contract Token { | |
| string public name = "DApp Token"; | |
| string public symbol = "DAPP"; | |
| uint256 public totalSupply = 1000000000000000000000000; // 1 million tokens | |
| uint8 public decimals = 18; | |
| event Transfer( | |
| address indexed _from, |
This file contains hidden or 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
| AWS CLI : aws ec2 describe-images --filters Name=name,Values=ubuntu* | |
| Output: | |
| { | |
| "Images": [ | |
| { | |
| "EnaSupport": true, |
This file contains hidden or 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
| OS Required: Ubuntu 16 - xenial | |
| Master node creation | |
| --------------------------- | |
| The first step of initialising the cluster is to launch the master node. | |
| The master is responsible for running the control plane components, etcd and the API server. |
This file contains hidden or 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: extensions/v1beta1 | |
| kind: Deployment | |
| metadata: | |
| name: bitbucket | |
| labels: | |
| app : bitbucket | |
| spec: | |
| template: |
This file contains hidden or 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
| Tesing on | |
| ------------------- | |
| Distributor ID: Debian | |
| Description: Debian GNU/Linux 8.6 (jessie) | |
| Release: 8.6 | |
| Codename: jessie | |
| Steps to follow: |
This file contains hidden or 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
| Ansible Facts will be in Json object |
This file contains hidden or 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 | |
| SRC=$1 | |
| DEST=$2 | |
| EXT=$3 | |
| if [ -d $1 -a -d $2 ];then | |
| for file in `ls *.$EXT `;do | |
| name=$(echo $file | cut -d "." -f1) | |
| if [ -d $DEST/$name ];then | |
| cp $SRC/$file $DEST/$name/$file |
This file contains hidden or 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
| Intense Troubleshooting Docker | |
| ############ Debug the docker-engine | |
| $dockerd --debug | |
| Output | |
| --------------------- | |
| DEBU[0000] docker group found. gid: 999 | |
| DEBU[0000] Listener created for HTTP on unix (/var/run/docker.sock) | |
| INFO[0000] libcontainerd: new containerd process, pid: 7996 |
This file contains hidden or 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 info | |
| root@ip-10-0-2-87:~# docker info | |
| Containers: 0 --------------------> ; Show containers present on the node evenif it is running or stopped | |
| Running: 0 --------------------> ; Currently running container #### $docker ps | |
| Paused: 0 --------------------> ; Paused Containers ;;## | |
| ; $docker unpause <Container ID> -> To unpause | |
| Stopped: 0 --------------------> ; Currently stopeed containers #### $docker ps -a -------> To check the stopped containers | |
| ; $docker start <Container ID> ----> to start the container |
This file contains hidden or 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
| We can add the repository url to the /etc/apt/sources.list using add-apt-repository | |
| $ sudo apt-get install python-software-properties ---------------> Package name | |
| #### Package will be available in https://packages.debian.org/jessie/admin/python-software-properties | |
| example adding the docker repository to the debian sources.list | |
| $ sudo add-apt-repository "deb https://apt.dockerproject.org/repo debian-$(lsb_release -cs) main" |
NewerOlder