- Installed azcli
- Authenticated azcli
- Set the subscription to the targeted subscription for deployment with azcli
az account set --subscription <mysubscription>
-
Check that you have an ssh public key
cat ~/.ssh/id_rsa.pub
- If there is no file then run
ssh-keygen
to generate one
- If there is no file then run
-
(optional) Run
curl ifconfig.me
and record your ip -
(optional) Overwrite the
my_ip
variable indemo.tfvars
-
Run
terraform init
-
Run
terraform apply -var-file ./demo.tfvars --auto-approve
-
Record the public ip frm the output
- If there is no output then run
terraform apply -var-file ./demo.tfvars --auto-approve
- NOTE: THIS SEEMS TO BE REQUIRED CURRENTLY
- If there is no output then run
-
Log into the instance with
ssh azureuser@<public_ip_address_here>
- NOTE: If you recieve access denied.. Go get coffee and try again :-)
-
run
sudo tail -f /var/log/cloud-init-output.log
-
Stretch
-
Once the log finishes record the GUID for the Jenkins admin initial password
-
Go to
http://<public_ip_address_here>:8080
-
Get coffee
-
Skip user creation and continue as admin
-
Select
Not now
for instance configuration -
Restart jenkins from the instance
sudo systemctl restart jenkins
-
Log back into Jenkins with admin and the initial password
-
Add the credentials to Jenkins
a. Manage Jenkins
b. Manage Credentials
c. System
d. Global Credentials
e. Add Credentials
f. Addusername and password
credentials as shown below.
* NOTE: Be sure to give them the id ofwiz-cli
-
Go back to the Jenkins Dashboard
-
Add the pipeline file data jenkins_pipeline to the pipeline steps
-
Run the pipeline
- If you recieve
Got permission denied while trying to connect to the Docker daemon socket
restart jenkins as shown above
- If you recieve
-
Review output
-
Add Wiz CICD Policies to the pipeline scans to make the pipeline fail for vulns.. then iac
-
Extra credit.. Figure out how to run pipeline steps on previous step failre (step conditons)