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 command to create an EC2 | |
aws ec2 run-instances --image-id ami-d440a6e7 --security-group-ids sg-1a534363 --count 1 --instance-type t2.micro --key-name aws-hplap --query 'Instances[0].InstanceId' | |
##knife bootstrap | |
knife bootstrap ec2-54-202-209-195.us-west-2.compute.amazonaws.com -r "role[jenkinsCI_1]" -x centos -E utilities_dev_1 -N jen --sudo |
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
The default conf file of nginx: | |
/etc/nginx/nginx.conf | |
The above file should have an entry like so: | |
include /etc/nginx/conf.d/*.conf; | |
The ^above line creates a directive to include any other configuration files. The config files can be for | |
http and https configuratons. | |
The conf files for HTTP & HTTPS will have the below directives: |
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
<#-- | |
Copyright 2017 XEBIALABS | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE |
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 | |
# Delete all containers | |
docker rm $(docker ps -a -q) | |
# Delete all images | |
docker rmi $(docker images -q) |
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
#available images | |
docker images | |
#active containers | |
docker ps | |
#all the containers | |
docker ps -a | |
#running docker image |
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
run the following chef generate cookbook command to generate a cookbook named learn_chef_httpd. | |
chef generate cookbook cookbooks/learn_chef_httpd |
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
Subnets do not span accross AZ's. | |
You are creating a new VPC with 3 subnets in 3 separate availability zones - By default all subnets will be able to communicate with each other using the main route table. | |
Create VPC | |
Create Subnets in multiple AZ | |
Create IGN | |
Attach IGN to VPC | |
## launching instances to test the internet connectivity and interconnectivity |
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
{ | |
"AWSTemplateFormatVersion" : "2010-09-09", | |
"Description" : "AWS CloudFormation Sample Template AutoScalingMultiAZWithNotifications: Create a multi-az, load balanced and Auto Scaled sample web site running on an Apache Web Serever. The application is configured to span all Availability Zones in the region and is Auto-Scaled based on the CPU utilization of the web servers. Notifications will be sent to the operator email address on scaling events. The instances are load balanced with a simple health check against the default web page. **WARNING** This template creates one or more Amazon EC2 instances and an Application Load Balancer. You will be billed for the AWS resources used if you create a stack from this template.", | |
"Parameters" : { | |
"VpcId" : { | |
"Type" : "AWS::EC2::VPC::Id", | |
"Description" : "VpcId of your existing Virtual Private Cloud (VPC)", |
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
#login and cache credentials | |
sfdx force:auth:web:login | |
#Adding the -d flag sets this org as the default Developer Hub. Use the -a to set an alias for the org | |
#(something catchy like DevHub). An alias is much easier to remember than the unique Dev Hub username | |
sfdx force:auth:web:login -d -a DevHub | |
### Only indicate the -d flag for your Dev Hub. | |
#Log In to Sandboxes |
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
$ sfdx force:doc:commands:list | |
=== Commands | |
force:alias:list # list username aliases for the Salesforce CLI | |
force:alias:set # set username aliases for the Salesforce CLI | |
force:apex:class:create # create an Apex class | |
force:apex:execute # execute anonymous Apex code | |
force:apex:log:get # fetch a debug log | |
force:apex:log:list # list debug logs | |
force:apex:test:report # display test results | |
force:apex:test:run # invoke Apex tests |