- AWS reserves both the first four IP addresses and the last IP address in each subnet CIDR block. They're not available for you to use.
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
#cloud-config | |
users: | |
- default | |
- name: stack | |
lock_passwd: False | |
sudo: ["ALL=(ALL) NOPASSWD:ALL\nDefaults:stack !requiretty"] | |
shell: /bin/bash | |
write_files: |
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 -L https://www.opscode.com/chef/install.sh | sudo bash | |
mkdir -p /tmp/chef/cookbooks | |
cd /tmp/chef/ | |
cat <<EOF > /tmp/chef/solo.rb | |
file_cache_path "/tmp/chef" | |
cookbook_path "/tmp/chef/cookbooks" | |
EOF | |
cat <<EOF > /tmp/chef/chef-jellyfish.json | |
{ | |
"run_list": [ |
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
##RHEL: | |
fdisk -l | |
df -alh | |
mkfs -t ext4 /dev/sdb | |
mkdir /services | |
mount /dev/sdb /services | |
df -alh | |
echo "/dev/sdb /services ext4 defaults 0 0" | sudo tee -a /etc/fstab | |
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
export SE_USER=USER | |
export SE_PASS=PASSWORD | |
echo "[sensu-enterprise] | |
name=sensu-enterprise | |
baseurl=http://$SE_USER:$SE_PASS@enterprise.sensuapp.com/yum/noarch/ | |
gpgcheck=0 | |
enabled=1" | sudo tee /etc/yum.repos.d/sensu-enterprise.repo | |
echo "[sensu-enterprise-dashboard] |
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 | |
yum update -y | |
cat >/etc/yum.repos.d/docker.repo <<-EOF | |
[dockerrepo] | |
name=Docker Repository | |
baseurl=https://yum.dockerproject.org/repo/main/centos/7 | |
enabled=1 | |
gpgcheck=1 | |
gpgkey=https://yum.dockerproject.org/gpg | |
EOF |
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
#cadvisor install | |
sudo docker run \ | |
--volume=/:/rootfs:ro \ | |
--volume=/var/run:/var/run:rw \ | |
--volume=/sys:/sys:ro \ | |
--volume=/cgroup:/cgroup:ro \ | |
--volume=/var/lib/docker/:/var/lib/docker:ro \ | |
--privileged=true \ | |
--publish=8080:8080 \ | |
--detach=true \ |
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 build -t hostname.of.dtrserver:5000/mandeep/jenkins . | |
docker push hostname.of.dtrserver:5000/mandeep/jenkins | |
docker build -t $orgname/$project:TAG . |
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
The following variables are available to shell scripts | |
echo $BUILD_NUMBER | |
5 | |
echo $BUILD_ID | |
5 | |
echo $BUILD_DISPLAY_NAME | |
#5 |
Here is how to expand the space:
Check free volume space:
sudo vgs
List volumes:
sudo lvs
Expand logical volume: