Skip to content

Fixed formatting and build errors in class 3 #191

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/class3/class3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,6 @@ Expected time to complete: **3 hours**
:glob:

labinfo/labinfo
labinfo/getting-started
labinfo/postman
module*/module*
66 changes: 33 additions & 33 deletions docs/class3/labinfo/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on the linux jumphost in UDF, run the following command to start the container,
the will attach a volume from the linux host to the container


.. code-block:: terminal
.. code-block:: bash

sudo docker run -v config:/home/snops/host_volume -p 2222:22 -p 10000:8080 -it --rm f5usecases/f5-rs-container

Expand All @@ -21,7 +21,7 @@ log in as jenkins (root password is 'default')

jenkins user is used so that the config changes we do are available to jenkins

.. code-block:: terminal
.. code-block:: bash

su root -c "su jenkins"

Expand All @@ -30,7 +30,7 @@ Create the SSH keys, the SSH key will be used when creating EC2 instances. we w

Copy credentilas and paramaters files from the host folder.

.. code-block:: terminal
.. code-block:: bash

ssh-keygen -f $HOME/.ssh/id_rsa -t rsa -N ''
cp /home/snops/host_volume/f5-rs-global-vars-vault.yaml /home/snops/f5-rs-global-vars-vault.yaml
Expand All @@ -40,7 +40,7 @@ Copy credentilas and paramaters files from the host folder.
configure your personal information in the global parameters file.
for the username use your student#, put your actual

.. code-block:: terminal
.. code-block:: bash

echo password > ~/.vault_pass.txt
ansible-vault edit --vault-password-file ~/.vault_pass.txt /home/snops/f5-rs-global-vars-vault.yaml
Expand All @@ -54,7 +54,7 @@ Configure jenkins and reload it

the following script will configure jenkins with your information and reload it.

.. code-block:: terminal
.. code-block:: bash

ansible-playbook --vault-password-file ~/.vault_pass.txt /home/snops/f5-rs-jenkins/playbooks/jenkins_config.yaml

Expand All @@ -81,40 +81,40 @@ start the dev environment
in jenkins open the 'DevSecOps - Lab - App2' folder', the lab files are all in this folder
we will start by deploying a dev environment, you will start a pipeline that creates a full environment in AWS.

.. image:: /docs/solutions/devsecops/images/jenkins010.PNG
.. image:: images/jenkins010.PNG
:width: 800 px
:align: center

click on the 'f5-rs-app2-dev' folder.
here you can see all of the relevant jenkins jobs for the dev environment.

.. image:: /docs/solutions/devsecops/images/jenkins020.PNG
.. image:: images/jenkins020.PNG
:width: 800 px
:align: center

click on 'Full stack deployment' , that's the pipeline view for the same folder.

.. image:: /docs/solutions/devsecops/images/jenkins030.PNG
.. image:: images/jenkins030.PNG
:width: 800 px
:align: center

click on 'run' to start the dev environment pipeline.

.. image:: /docs/solutions/devsecops/images/jenkins040.PNG
.. image:: images/jenkins040.PNG
:width: 800 px
:align: center


you can review the output of each job while its running, click on the small 'console output' icon as shown in the screenshot:

.. image:: /docs/solutions/devsecops/images/jenkins050.PNG
.. image:: images/jenkins050.PNG
:width: 800 px
:align: center


wait until all of the jobs have finished (turned green).

.. image:: /docs/solutions/devsecops/images/jenkins060.PNG
.. image:: images/jenkins060.PNG
:width: 800 px
:align: center

Expand All @@ -123,7 +123,7 @@ go to the 'builds' channel.
use the search box on the upper right corner and filter by your username (student#).
jenkins will send to this channel the bigip and the application address.

.. image:: /docs/solutions/devsecops/images/Slack-040.PNG
.. image:: images/Slack-040.PNG
:width: 800 px
:align: center

Expand Down Expand Up @@ -157,7 +157,7 @@ try to access the app using the ip provided in the slack channel - that's the El
after ignoring the ssl error (because the certificate isn't valid for the domain) you should get to the Hackazone mainpage


.. image:: /docs/solutions/devsecops/images/hackazone010.PNG
.. image:: images/hackazone010.PNG
:width: 800 px
:align: center

Expand All @@ -171,7 +171,7 @@ you should see a suggestion on 'High ASCII characters in headers' , examine the
accept the suggestion.


.. image:: /docs/solutions/devsecops/images/Bigip-040.PNG
.. image:: images/Bigip-040.PNG
:width: 800 px
:align: center

Expand All @@ -181,13 +181,13 @@ apply the policy. we will now export the policy to the git repo and start the au

go back to jenkins, under the 'f5-rs-app2-dev' there is a job that will export the policy and save it to the git repo - 'SEC export waf policy'

.. image:: /docs/solutions/devsecops/images/jenkins075.PNG
.. image:: images/jenkins075.PNG
:width: 800 px
:align: center

click on this job and choose 'Build with Parameters' from the left menu.

.. image:: /docs/solutions/devsecops/images/jenkins080.PNG
.. image:: images/jenkins080.PNG
:width: 800 px
:align: center

Expand All @@ -198,7 +198,7 @@ click on 'build'
check the slack channel - you should see a message about the new security policy that's ready.
this illustrates how chatops can help between different teams.

.. image:: /docs/solutions/devsecops/images/Slack-030.PNG
.. image:: images/Slack-030.PNG
:width: 800 px
:align: center

Expand All @@ -211,28 +211,28 @@ ssh into the contianer, make sure you are connected as user 'jenkins'
go to the application git folder. check which branches are there and what is the active branch. (git branch)
you should be on the 'dev' branch. the files you see belong to the dev branch.

.. code-block:: terminal
.. code-block:: bash

cd /home/snops/f5-rs-app2
git branch

Configure your information in git, this information is used by git (in this lab we use local git so it only has local meaning)

.. code-block:: terminal
.. code-block:: bash

git config --global user.email "[email protected]"
git config --global user.name "Your Name"


edit the iac_parameters.yaml file to point the deployment to the new ASM policy (linux-high-v01). then add the file to git and commit

.. code-block:: terminal
.. code-block:: bash

vi iac_parameters.yaml
git add iac_parameters.yaml
git commit -m "changed asm policy"

.. image:: /docs/solutions/devsecops/images/dev-cmd-010.PNG
.. image:: images/dev-cmd-010.PNG
:width: 800 px
:align: center

Expand All @@ -248,7 +248,7 @@ this concludes the tests in the 'dev' environment. we are now ready to push the
we will 'merge' the app2 dev branch with the master branch so that the production deployment will use the correct policy.
on the /home/snops/f5-rs-app2 folder:

.. code-block:: terminal
.. code-block:: bash

git checkout master
git merge -m "changed asm policy"
Expand Down Expand Up @@ -282,7 +282,7 @@ ssh into the contianer, make sure you are connected as user 'jenkins'
go to the application git folder. check which branches are there and what is the active branch. (git branch)
you should be on the 'dev' branch. the files you see belong to the dev branch.

.. code-block:: terminal
.. code-block:: bash

cd /home/snops/f5-rs-app2
git checkout dev
Expand All @@ -300,7 +300,7 @@ proactive_autometed_attack_prevention: "always"

add the file to git and commit

.. code-block:: terminal
.. code-block:: bash

vi iac_parameters.yaml
git add iac_parameters.yaml
Expand All @@ -313,13 +313,13 @@ jenkins takes the parametes from the git repo and uses them to deploy/update the

log on to the dev bigip again, check the setting on the dos profile named rs_dosl7, verify that proactive bot defense is now enabled.

.. image:: /docs/solutions/devsecops/images/pbd-bigip-010.PNG
.. image:: images/pbd-bigip-010.PNG
:width: 800 px
:align: center

on the bigip, check the bot request log, verify that requests are being challanged

.. image:: /docs/solutions/devsecops/images/pbd-bigip-020.PNG
.. image:: images/pbd-bigip-020.PNG
:width: 800 px
:align: center

Expand All @@ -328,7 +328,7 @@ this concludes the tests in the 'dev' environment. we are now ready to push the
we will 'merge' the app2 dev branch with the master branch so that the production deployment will use the correct policy.
on the /home/snops/f5-rs-app2 folder:

.. code-block:: terminal
.. code-block:: bash

git checkout master
git merge -m "enabled proactive bot defense"
Expand All @@ -354,7 +354,7 @@ ssh into the contianer, make sure you are connected as user 'jenkins'
go to the application git folder. check which branches are there and what is the active branch. (git branch)
you should be on the 'dev' branch. the files you see belong to the dev branch.

.. code-block:: terminal
.. code-block:: bash

cd /home/snops/f5-rs-app2
git checkout dev
Expand All @@ -372,7 +372,7 @@ login_password_encryption: "enabled"

add the file to git and commit

.. code-block:: terminal
.. code-block:: bash

vi iac_parameters.yaml
git add iac_parameters.yaml
Expand All @@ -385,16 +385,16 @@ jenkins takes the parametes from the git repo and uses them to deploy/update the

log on to the dev bigip again, check the setting on the FPS profile.

.. image:: /docs/solutions/devsecops/images/ale-bigip-010.PNG
:width: 800 px
:align: center
.. images/pdb-bigip-010.PNG
.. :width: 800 px
.. :align: center


this concludes the tests in the 'dev' environment. we are now ready to push the changes to production.
we will 'merge' the app2 dev branch with the master branch so that the production deployment will use the correct policy.
on the /home/snops/f5-rs-app2 folder:

.. code-block:: terminal
.. code-block:: bash

git checkout master
git merge -m "enabled login password encryption"
Expand Down
Binary file added docs/class3/labinfo/images/Bigip-030.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/class3/labinfo/images/Bigip-040.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/class3/labinfo/images/Slack-030.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/class3/labinfo/images/Slack-040.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/class3/labinfo/images/dev-cmd-010.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/class3/labinfo/images/hackazone010.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/class3/labinfo/images/jenkins010.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/class3/labinfo/images/jenkins020.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/class3/labinfo/images/jenkins030.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/class3/labinfo/images/jenkins040.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/class3/labinfo/images/jenkins050.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/class3/labinfo/images/jenkins053.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/class3/labinfo/images/jenkins055.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/class3/labinfo/images/jenkins056.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/class3/labinfo/images/jenkins060.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/class3/labinfo/images/jenkins070.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/class3/labinfo/images/jenkins075.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/class3/labinfo/images/jenkins080.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/class3/labinfo/images/pbd-bigip-010.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/class3/labinfo/images/pbd-bigip-020.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/class3/labinfo/labinfo.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,5 @@ components:
:maxdepth: 2
:glob:

labinfo/postman
module*/module*
postman
getting-started
2 changes: 0 additions & 2 deletions docs/class3/labinfo/postman.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@ Perform the following steps to complete this task:
:maxdepth: 2
:glob:

module*/module*


.. |postman-icon| image:: /images/postman-icon.png
:scale: 70%
Expand Down
1 change: 1 addition & 0 deletions docs/class3/module2/lab3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ In this lab, the iControl REST based API will be used to create both an ASM pare
}
]
}

|labmodule|\.\ |labnum|\.1.1. Retrieve LTM ASM Profile Web Security
---------------------------------------------------------------------

Expand Down
Binary file added docs/class3/module3/images/Slack-040.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions docs/class3/module3/lab1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Task |labmodule|\.\ |labnum|\.1.1 - Review Dave's repo

On the container CLI type the following command to view git branches:

.. code-block:: terminal
.. code-block:: bash

cd /home/snops/f5-rs-app3
git branch
Expand All @@ -58,7 +58,7 @@ The app repository has two branches, ``dev`` and ``master``. We are now working

On the container CLI type the following commands to view the files in the repo:

.. code-block:: terminal
.. code-block:: bash

ls

Expand All @@ -68,7 +68,7 @@ On the container CLI type the following commands to view the files in the repo:
|labmodule|\.\ |labnum|\.1.1.3 explore the infrastructure as code parameters file:
***********************************************************************************

.. code-block:: terminal
.. code-block:: bash

more iac_parameters.yaml

Expand Down
4 changes: 0 additions & 4 deletions docs/class3/module3/lab2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,7 @@ We will now export the policy from the BIGIP A to the waf-policies repo (managed
- The security admin role ends here, it's now up to Dave to run the pipeline again.



.. |Bigip-030| image:: images/Bigip-030.PNG

.. |jenkins075| image:: images/jenkins075.PNG

.. |jenkins080| image:: images/jenkins080.PNG

.. |Slack-030| image:: images/Slack-030.PNG
10 changes: 5 additions & 5 deletions docs/class3/module3/lab3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ arbitrary.

* From the container copy and paste:

.. code-block:: terminal
.. code-block:: bash

git config --global user.email "[email protected]"
git config --global user.name "John Doe"
Expand All @@ -41,10 +41,10 @@ arbitrary.
- Check the branches and which is the active branch (command below)
- You should be in the 'dev' branch, the files you see belong to the dev branch

.. code-block:: terminal
.. code-block:: bash

cd /home/snops/f5-rs-app3
git branch
git branch

|labmodule|\.\ |labnum|\.3.1.3 Update the Infrastructure as Code parameters file:
**********************************************************************************
Expand All @@ -58,10 +58,10 @@ Once we modify the file we then need to add the file to git and commit.

* From the container copy and paste:

.. code-block:: terminal
.. code-block:: bash

git add iac_parameters.yaml
git commit -m "changed asm policy"
git commit -m "changed asm policy"


|dev-cmd-010|
Expand Down
2 changes: 1 addition & 1 deletion docs/class3/module3/lab4.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Task |labmodule|\.\ |labnum|\.4.1 - Merge Infrastructure as Code file from dev

* Execute below code:

.. code-block:: terminal
.. code-block:: bash

git checkout master
git merge dev -m "changed asm policy"
Expand Down
Loading