diff --git a/CHANGELOG.md b/CHANGELOG.md index 15baf23f..0e965424 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Rename syringe.yaml to lesson.meta.yaml, and move lessons into descriptive subdirs [#222](https://github.com/nre-learning/nrelabs-curriculum/pull/222) - Prepare curriculum for collections [#224](https://github.com/nre-learning/nrelabs-curriculum/pull/224) - Update all paths with new lesson directory mount point [#227](https://github.com/nre-learning/nrelabs-curriculum/pull/227) +- Converting existing lessons to match new endpoint format [#230](https://github.com/nre-learning/nrelabs-curriculum/pull/230) ## v0.3.2 - April 19, 2019 diff --git a/images/configurator/Dockerfile b/images/configurator/Dockerfile index 5404fd19..f28977e6 100644 --- a/images/configurator/Dockerfile +++ b/images/configurator/Dockerfile @@ -1,5 +1,7 @@ FROM python +RUN apt-get update && apt-get install sshpass + COPY requirements.txt / RUN pip install -r /requirements.txt diff --git a/images/configurator/configure.py b/images/configurator/configure.py index dd3584b2..40dd0c1d 100755 --- a/images/configurator/configure.py +++ b/images/configurator/configure.py @@ -18,8 +18,13 @@ with driver(hostname=host, username=user, password=password, optional_args={'port': port}) as device: # Retrieve management IP address - # TODO(mierdin): this is junos-specific. Will need to maintain a list of management interfaces per vendor, - # or expose this as a field in the endpoint. + # + # TODO(mierdin): while this script works for any vendor, the IP address replacement functionality using Jinja + # below is specific to Junos. So, any other vendor device must use NAT for now. This should be easy to fix, though. + # The best approach will be to provide interface_ip_details to the template, rather than a specific interface. Then, + # the underlying config can specify the interface they want. The change here will be simple - the tedious work will + # be updating all existing configs to use the new dictionary. + interface_ip_details = device.get_interfaces_ip()['em0.0'] for addr, prefix in interface_ip_details['ipv4'].items(): address_cidr = "%s/%s" % (addr, prefix['prefix_length']) diff --git a/images/configurator/requirements.txt b/images/configurator/requirements.txt index a98b3969..5aa8792e 100644 --- a/images/configurator/requirements.txt +++ b/images/configurator/requirements.txt @@ -1 +1,2 @@ napalm +ansible diff --git a/images/notebook/push.sh b/images/notebook/push.sh index 46288e67..55e542b2 100755 --- a/images/notebook/push.sh +++ b/images/notebook/push.sh @@ -1,2 +1,2 @@ -docker build -t antidotelabs/jupyter . -docker push antidotelabs/jupyter +docker build -t antidotelabs/jupyter:newpath . +docker push antidotelabs/jupyter:newpath diff --git a/images/selfservice-flask-app/flask_bootstrap/__init__.py b/images/selfservice-flask-app/flask_bootstrap/__init__.py index 9a33fd5b..fd3c586c 100644 --- a/images/selfservice-flask-app/flask_bootstrap/__init__.py +++ b/images/selfservice-flask-app/flask_bootstrap/__init__.py @@ -163,19 +163,19 @@ def lwrap(cdn, primary=static): return ConditionalCDN('BOOTSTRAP_SERVE_LOCAL', primary, cdn) bootstrap = lwrap( - WebCDN('//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/%s/' % + WebCDN('https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/%s/' % BOOTSTRAP_VERSION), local) jquery = lwrap( - WebCDN('//cdnjs.cloudflare.com/ajax/libs/jquery/%s/' % + WebCDN('https://cdnjs.cloudflare.com/ajax/libs/jquery/%s/' % JQUERY_VERSION), local) html5shiv = lwrap( - WebCDN('//cdnjs.cloudflare.com/ajax/libs/html5shiv/%s/' % + WebCDN('https://cdnjs.cloudflare.com/ajax/libs/html5shiv/%s/' % HTML5SHIV_VERSION)) respondjs = lwrap( - WebCDN('//cdnjs.cloudflare.com/ajax/libs/respond.js/%s/' % + WebCDN('https://cdnjs.cloudflare.com/ajax/libs/respond.js/%s/' % RESPONDJS_VERSION)) app.extensions['bootstrap'] = { diff --git a/lessons/fundamentals/lesson-1-demo/lesson.meta.yaml b/lessons/fundamentals/lesson-1-demo/lesson.meta.yaml new file mode 100644 index 00000000..e77acd2a --- /dev/null +++ b/lessons/fundamentals/lesson-1-demo/lesson.meta.yaml @@ -0,0 +1,77 @@ +--- +lessonName: Antidote Test Lesson +lessonId: 1 +category: fundamentals +tier: ptr #NEVER promote to prod. Not a real lesson +lessonDiagram: https://raw.githubusercontent.com/nre-learning/nrelabs-curriculum/v0.3.2/lessons/lesson-15/lessondiagram.png +description: | + Example lesson used to test the various features of the Antidote platform + +slug: selfservice +tags: +- foo +- bar + +endpoints: + +- name: influxdb + image: influxdb + additionalPorts: [8086] + +- name: selfservice + image: antidotelabs/selfservice-flask-app + presentations: + - name: web + port: 5000 + type: http + +- name: vqfx1 + image: antidotelabs/vqfx:snap1 + configurationType: python + presentations: + - name: cli + port: 22 + type: ssh + +- name: vqfx2 + image: antidotelabs/vqfx:snap2 + configurationType: napalm-junos + presentations: + - name: cli + port: 22 + type: ssh + +- name: vqfx3 + image: antidotelabs/vqfx:snap3 + configurationType: napalm-junos + presentations: + - name: cli + port: 22 + type: ssh + +- name: linux + image: antidotelabs/utility + configurationType: ansible + presentations: + - name: cli1 + port: 22 + type: ssh + - name: cli2 + port: 22 + type: ssh + +connections: +- a: vqfx1 + b: vqfx2 +- a: vqfx2 + b: vqfx3 +- a: vqfx3 + b: vqfx1 + +stages: + + - id: 1 + description: Stage 1 + - id: 2 + description: Stage 2 + jupyterLabGuide: true \ No newline at end of file diff --git a/lessons/fundamentals/lesson-1-demo/stage1/configs/linux.yml b/lessons/fundamentals/lesson-1-demo/stage1/configs/linux.yml new file mode 100644 index 00000000..32569229 --- /dev/null +++ b/lessons/fundamentals/lesson-1-demo/stage1/configs/linux.yml @@ -0,0 +1,15 @@ +--- +- name: test playbook + hosts: all + gather_facts: no + vars: + ansible_user: antidote + ansible_password: antidotepassword + tasks: + + - name: Debug date + shell: date + register: date_output + + - debug: + msg: "{{ date_output }}" \ No newline at end of file diff --git a/lessons/fundamentals/lesson-1-demo/stage1/configs/vqfx1.py b/lessons/fundamentals/lesson-1-demo/stage1/configs/vqfx1.py new file mode 100644 index 00000000..2f1bff4e --- /dev/null +++ b/lessons/fundamentals/lesson-1-demo/stage1/configs/vqfx1.py @@ -0,0 +1,32 @@ +#!/usr/bin/env python + +import sys, os +import napalm +from jinja2 import FileSystemLoader, Environment + +user = "antidote" +password = "antidotepassword" +vendor = "junos" +port = "22" +host = os.getenv("SYRINGE_TARGET_HOST") +template_file = "vqfx1.txt" + +driver = napalm.get_network_driver(vendor) +with driver(hostname=host, username=user, password=password, optional_args={'port': port}) as device: + + # Retrieve management IP address + # TODO(mierdin): this is junos-specific. Will need to maintain a list of management interfaces per vendor, + # or expose this as a field in the endpoint. + interface_ip_details = device.get_interfaces_ip()['em0.0'] + for addr, prefix in interface_ip_details['ipv4'].items(): + address_cidr = "%s/%s" % (addr, prefix['prefix_length']) + + # Create template configuration with this address + loader = FileSystemLoader([os.path.dirname(os.path.realpath(__file__))]) # Use current directory + env = Environment(loader=loader, trim_blocks=True, lstrip_blocks=True) + template_object = env.get_template(template_file) + rendered_config = template_object.render(mgmt_addr=address_cidr) + + # Push rendered config to device + device.load_replace_candidate(config=rendered_config) + device.commit_config() diff --git a/lessons/fundamentals/lesson-1-demo/stage1/configs/vqfx1.txt b/lessons/fundamentals/lesson-1-demo/stage1/configs/vqfx1.txt new file mode 100644 index 00000000..83fba292 --- /dev/null +++ b/lessons/fundamentals/lesson-1-demo/stage1/configs/vqfx1.txt @@ -0,0 +1,165 @@ + + 15.1X53-D60.4 + + vqfx1 + + $1$mlo32jo6$BOMVhmtORai2Kr24wRCCv1 + + ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ== vagrant insecure public key + + + + + antidote + super-user + + $1$iH4TNedH$3RKJbtDRO.N4Ua8B6LL/v/ + + + + set-transitions + 0 + + + + + allow + + + + + + + + + 8080 + + + + + + + * + + any + + + + + messages + + any + + + + authorization + + + + + interactive-commands + + interactive-commands + + + + + + + juniper + + juniper + commercial + + + + chef + + juniper + commercial + + + + + + + em0 + + 0 + + +
+ {{ mgmt_addr }} +
+
+
+
+
+ + em3 + + 0 + + +
+ 10.12.0.11/24 +
+
+
+
+
+ + em4 + + 0 + + +
+ 10.31.0.11/24 +
+
+
+
+
+
+ + + default + + + + + + + 64001 + + + + + + PEERS + external + + 10.31.0.13 + 64003 + + + 10.12.0.12 + 64002 + + + + + + default + + + + + + + default + 1 + + +
\ No newline at end of file diff --git a/lessons/fundamentals/lesson-1-demo/stage1/configs/vqfx2.txt b/lessons/fundamentals/lesson-1-demo/stage1/configs/vqfx2.txt new file mode 100644 index 00000000..204fbf33 --- /dev/null +++ b/lessons/fundamentals/lesson-1-demo/stage1/configs/vqfx2.txt @@ -0,0 +1,165 @@ + + 15.1X53-D60.4 + + vqfx2 + + $1$mlo32jo6$BOMVhmtORai2Kr24wRCCv1 + + ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ== vagrant insecure public key + + + + + antidote + super-user + + $1$iH4TNedH$3RKJbtDRO.N4Ua8B6LL/v/ + + + + set-transitions + 0 + + + + + allow + + + + + + + + + 8080 + + + + + + + * + + any + + + + + messages + + any + + + + authorization + + + + + interactive-commands + + interactive-commands + + + + + + + juniper + + juniper + commercial + + + + chef + + juniper + commercial + + + + + + + em0 + + 0 + + +
+ {{ mgmt_addr }} +
+
+
+
+
+ + em3 + + 0 + + +
+ 10.12.0.12/24 +
+
+
+
+
+ + em4 + + 0 + + +
+ 10.23.0.12/24 +
+
+
+
+
+
+ + + default + + + + + + + 64002 + + + + + + PEERS + external + + 10.12.0.11 + 64001 + + + 10.23.0.13 + 64003 + + + + + + default + + + + + + + default + 1 + + +
\ No newline at end of file diff --git a/lessons/fundamentals/lesson-1-demo/stage1/configs/vqfx3.txt b/lessons/fundamentals/lesson-1-demo/stage1/configs/vqfx3.txt new file mode 100644 index 00000000..2516e424 --- /dev/null +++ b/lessons/fundamentals/lesson-1-demo/stage1/configs/vqfx3.txt @@ -0,0 +1,165 @@ + + 15.1X53-D60.4 + + vqfx3 + + $1$mlo32jo6$BOMVhmtORai2Kr24wRCCv1 + + ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ== vagrant insecure public key + + + + + antidote + super-user + + $1$iH4TNedH$3RKJbtDRO.N4Ua8B6LL/v/ + + + + set-transitions + 0 + + + + + allow + + + + + + + + + 8080 + + + + + + + * + + any + + + + + messages + + any + + + + authorization + + + + + interactive-commands + + interactive-commands + + + + + + + juniper + + juniper + commercial + + + + chef + + juniper + commercial + + + + + + + em0 + + 0 + + +
+ {{ mgmt_addr }} +
+
+
+
+
+ + em3 + + 0 + + +
+ 10.23.0.13/24 +
+
+
+
+
+ + em4 + + 0 + + +
+ 10.31.0.13/24 +
+
+
+
+
+
+ + + default + + + + + + + 64003 + + + + + + PEERS + external + + 10.23.0.12 + 64002 + + + 10.31.0.11 + 64001 + + + + + + default + + + + + + + default + 1 + + +
\ No newline at end of file diff --git a/lessons/fundamentals/lesson-1-demo/stage1/guide.md b/lessons/fundamentals/lesson-1-demo/stage1/guide.md new file mode 100644 index 00000000..aa05dad5 --- /dev/null +++ b/lessons/fundamentals/lesson-1-demo/stage1/guide.md @@ -0,0 +1,24 @@ +## Example Lesson + +--- + +### This is a Test + +This lesson is meant to be a test of the various features of the Antidote platform. + +Run the below snippet to test the `linux-cli1` presentation: + +``` +date +``` + + +Next, run this command in the second presentation for that same endpoint. This will also test that the influxdb endpoint, which has no presentations in the UI, +is still reachable from the lesson endpoints. + +``` +curl http://influxdb:8086/query?pretty=true --data-urlencode "q=show databases" | jq +``` + + + diff --git a/lessons/fundamentals/lesson-1-demo/stage2/configs/linux.yml b/lessons/fundamentals/lesson-1-demo/stage2/configs/linux.yml new file mode 100644 index 00000000..632be432 --- /dev/null +++ b/lessons/fundamentals/lesson-1-demo/stage2/configs/linux.yml @@ -0,0 +1,15 @@ +--- +- name: test playbook + hosts: all + gather_facts: no + vars: + ansible_user: antidote + ansible_password: antidotepassword + tasks: + + - name: Configure kubernetes repo + shell: date + register: date_output + + - debug: + msg: "{{ date_output }}" \ No newline at end of file diff --git a/lessons/fundamentals/lesson-1-demo/stage2/configs/vqfx1.py b/lessons/fundamentals/lesson-1-demo/stage2/configs/vqfx1.py new file mode 100644 index 00000000..2f1bff4e --- /dev/null +++ b/lessons/fundamentals/lesson-1-demo/stage2/configs/vqfx1.py @@ -0,0 +1,32 @@ +#!/usr/bin/env python + +import sys, os +import napalm +from jinja2 import FileSystemLoader, Environment + +user = "antidote" +password = "antidotepassword" +vendor = "junos" +port = "22" +host = os.getenv("SYRINGE_TARGET_HOST") +template_file = "vqfx1.txt" + +driver = napalm.get_network_driver(vendor) +with driver(hostname=host, username=user, password=password, optional_args={'port': port}) as device: + + # Retrieve management IP address + # TODO(mierdin): this is junos-specific. Will need to maintain a list of management interfaces per vendor, + # or expose this as a field in the endpoint. + interface_ip_details = device.get_interfaces_ip()['em0.0'] + for addr, prefix in interface_ip_details['ipv4'].items(): + address_cidr = "%s/%s" % (addr, prefix['prefix_length']) + + # Create template configuration with this address + loader = FileSystemLoader([os.path.dirname(os.path.realpath(__file__))]) # Use current directory + env = Environment(loader=loader, trim_blocks=True, lstrip_blocks=True) + template_object = env.get_template(template_file) + rendered_config = template_object.render(mgmt_addr=address_cidr) + + # Push rendered config to device + device.load_replace_candidate(config=rendered_config) + device.commit_config() diff --git a/lessons/fundamentals/lesson-1-demo/stage2/configs/vqfx1.txt b/lessons/fundamentals/lesson-1-demo/stage2/configs/vqfx1.txt new file mode 100644 index 00000000..83fba292 --- /dev/null +++ b/lessons/fundamentals/lesson-1-demo/stage2/configs/vqfx1.txt @@ -0,0 +1,165 @@ + + 15.1X53-D60.4 + + vqfx1 + + $1$mlo32jo6$BOMVhmtORai2Kr24wRCCv1 + + ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ== vagrant insecure public key + + + + + antidote + super-user + + $1$iH4TNedH$3RKJbtDRO.N4Ua8B6LL/v/ + + + + set-transitions + 0 + + + + + allow + + + + + + + + + 8080 + + + + + + + * + + any + + + + + messages + + any + + + + authorization + + + + + interactive-commands + + interactive-commands + + + + + + + juniper + + juniper + commercial + + + + chef + + juniper + commercial + + + + + + + em0 + + 0 + + +
+ {{ mgmt_addr }} +
+
+
+
+
+ + em3 + + 0 + + +
+ 10.12.0.11/24 +
+
+
+
+
+ + em4 + + 0 + + +
+ 10.31.0.11/24 +
+
+
+
+
+
+ + + default + + + + + + + 64001 + + + + + + PEERS + external + + 10.31.0.13 + 64003 + + + 10.12.0.12 + 64002 + + + + + + default + + + + + + + default + 1 + + +
\ No newline at end of file diff --git a/lessons/fundamentals/lesson-1-demo/stage2/configs/vqfx2.txt b/lessons/fundamentals/lesson-1-demo/stage2/configs/vqfx2.txt new file mode 100644 index 00000000..204fbf33 --- /dev/null +++ b/lessons/fundamentals/lesson-1-demo/stage2/configs/vqfx2.txt @@ -0,0 +1,165 @@ + + 15.1X53-D60.4 + + vqfx2 + + $1$mlo32jo6$BOMVhmtORai2Kr24wRCCv1 + + ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ== vagrant insecure public key + + + + + antidote + super-user + + $1$iH4TNedH$3RKJbtDRO.N4Ua8B6LL/v/ + + + + set-transitions + 0 + + + + + allow + + + + + + + + + 8080 + + + + + + + * + + any + + + + + messages + + any + + + + authorization + + + + + interactive-commands + + interactive-commands + + + + + + + juniper + + juniper + commercial + + + + chef + + juniper + commercial + + + + + + + em0 + + 0 + + +
+ {{ mgmt_addr }} +
+
+
+
+
+ + em3 + + 0 + + +
+ 10.12.0.12/24 +
+
+
+
+
+ + em4 + + 0 + + +
+ 10.23.0.12/24 +
+
+
+
+
+
+ + + default + + + + + + + 64002 + + + + + + PEERS + external + + 10.12.0.11 + 64001 + + + 10.23.0.13 + 64003 + + + + + + default + + + + + + + default + 1 + + +
\ No newline at end of file diff --git a/lessons/fundamentals/lesson-1-demo/stage2/configs/vqfx3.txt b/lessons/fundamentals/lesson-1-demo/stage2/configs/vqfx3.txt new file mode 100644 index 00000000..2516e424 --- /dev/null +++ b/lessons/fundamentals/lesson-1-demo/stage2/configs/vqfx3.txt @@ -0,0 +1,165 @@ + + 15.1X53-D60.4 + + vqfx3 + + $1$mlo32jo6$BOMVhmtORai2Kr24wRCCv1 + + ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ== vagrant insecure public key + + + + + antidote + super-user + + $1$iH4TNedH$3RKJbtDRO.N4Ua8B6LL/v/ + + + + set-transitions + 0 + + + + + allow + + + + + + + + + 8080 + + + + + + + * + + any + + + + + messages + + any + + + + authorization + + + + + interactive-commands + + interactive-commands + + + + + + + juniper + + juniper + commercial + + + + chef + + juniper + commercial + + + + + + + em0 + + 0 + + +
+ {{ mgmt_addr }} +
+
+
+
+
+ + em3 + + 0 + + +
+ 10.23.0.13/24 +
+
+
+
+
+ + em4 + + 0 + + +
+ 10.31.0.13/24 +
+
+
+
+
+
+ + + default + + + + + + + 64003 + + + + + + PEERS + external + + 10.23.0.12 + 64002 + + + 10.31.0.11 + 64001 + + + + + + default + + + + + + + default + 1 + + +
\ No newline at end of file diff --git a/lessons/fundamentals/lesson-1-demo/stage2/notebook.ipynb b/lessons/fundamentals/lesson-1-demo/stage2/notebook.ipynb new file mode 100644 index 00000000..ef323ca1 --- /dev/null +++ b/lessons/fundamentals/lesson-1-demo/stage2/notebook.ipynb @@ -0,0 +1,52 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Test Lesson\n", + "\n", + "## Stage 2\n", + "\n", + "> This tests the ability for jupyter notebooks to be used for lesson guides" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "FOOBAR" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [], + "source": [ + "import napalm" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.6.6" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/lessons/fundamentals/lesson-14-yaml/lesson.meta.yaml b/lessons/fundamentals/lesson-14-yaml/lesson.meta.yaml index 4a835fee..9c0990d8 100644 --- a/lessons/fundamentals/lesson-14-yaml/lesson.meta.yaml +++ b/lessons/fundamentals/lesson-14-yaml/lesson.meta.yaml @@ -12,9 +12,13 @@ tags: - data modeling - data model -utilities: +endpoints: - name: linux1 image: antidotelabs/utility + presentations: + - name: cli + port: 22 + type: ssh stages: - id: 1 diff --git a/lessons/fundamentals/lesson-16-jinja/lesson.meta.yaml b/lessons/fundamentals/lesson-16-jinja/lesson.meta.yaml index a209c5d9..76cf1b06 100644 --- a/lessons/fundamentals/lesson-16-jinja/lesson.meta.yaml +++ b/lessons/fundamentals/lesson-16-jinja/lesson.meta.yaml @@ -15,9 +15,13 @@ tags: - configuration templates - configuration -utilities: +endpoints: - name: linux1 image: antidotelabs/utility + presentations: + - name: cli + port: 22 + type: ssh stages: - id: 1 diff --git a/lessons/fundamentals/lesson-17-git/lesson.meta.yaml b/lessons/fundamentals/lesson-17-git/lesson.meta.yaml index 572a5c32..abe7bef2 100644 --- a/lessons/fundamentals/lesson-17-git/lesson.meta.yaml +++ b/lessons/fundamentals/lesson-17-git/lesson.meta.yaml @@ -12,9 +12,13 @@ tags: - versioning - git -utilities: +endpoints: - name: linux1 image: antidotelabs/utility + presentations: + - name: cli + port: 22 + type: ssh stages: - id: 1 diff --git a/lessons/fundamentals/lesson-19-restapis/lesson.meta.yaml b/lessons/fundamentals/lesson-19-restapis/lesson.meta.yaml index 14d0c1be..a548071c 100644 --- a/lessons/fundamentals/lesson-19-restapis/lesson.meta.yaml +++ b/lessons/fundamentals/lesson-19-restapis/lesson.meta.yaml @@ -2,7 +2,7 @@ lessonName: Working with REST APIs lessonId: 19 category: fundamentals -lessondiagram: https://raw.githubusercontent.com/nre-learning/nrelabs-curriculum/master/lessons/lesson-19/lessondiagram.png +lessondiagram: https://raw.githubusercontent.com/nre-learning/nrelabs-curriculum/v0.3.2/lessons/lesson-19/lessondiagram.png tier: prod prereqs: - 22 # Python @@ -15,20 +15,42 @@ tags: - rest api - programmability -utilities: + +endpoints: + - name: linux1 image: antidotelabs/utility + presentations: + - name: cli + port: 22 + type: ssh -devices: - name: vqfx1 image: antidotelabs/vqfx:snap1 - ports: [8080] + configurationType: napalm-junos + presentations: + - name: cli + port: 22 + type: ssh + additionalPorts: [8080] + - name: vqfx2 image: antidotelabs/vqfx:snap2 - ports: [8080] + configurationType: napalm-junos + presentations: + - name: cli + port: 22 + type: ssh + additionalPorts: [8080] + - name: vqfx3 image: antidotelabs/vqfx:snap3 - ports: [8080] + configurationType: napalm-junos + presentations: + - name: cli + port: 22 + type: ssh + additionalPorts: [8080] connections: - a: vqfx1 diff --git a/lessons/fundamentals/lesson-22-python/lesson.meta.yaml b/lessons/fundamentals/lesson-22-python/lesson.meta.yaml index f30b46fc..8c9019ad 100644 --- a/lessons/fundamentals/lesson-22-python/lesson.meta.yaml +++ b/lessons/fundamentals/lesson-22-python/lesson.meta.yaml @@ -2,7 +2,7 @@ lessonName: Introduction to Python lessonId: 22 category: fundamentals -lessondiagram: https://raw.githubusercontent.com/nre-learning/nrelabs-curriculum/master/lessons/lesson-22/lessondiagram.png +lessondiagram: https://raw.githubusercontent.com/nre-learning/nrelabs-curriculum/v0.3.2/lessons/lesson-22/lessondiagram.png tier: ptr prereqs: - 23 # Linux @@ -12,9 +12,13 @@ tags: - python - programming -utilities: +endpoints: - name: linux1 image: antidotelabs/utility + presentations: + - name: cli + port: 22 + type: ssh stages: - id: 1 diff --git a/lessons/fundamentals/lesson-23-linux/lesson.meta.yaml b/lessons/fundamentals/lesson-23-linux/lesson.meta.yaml index 4acd4b67..862cc136 100644 --- a/lessons/fundamentals/lesson-23-linux/lesson.meta.yaml +++ b/lessons/fundamentals/lesson-23-linux/lesson.meta.yaml @@ -9,9 +9,13 @@ tags: description: Being able to work with Linux and the Bash shell is becoming an increasingly important skill in the world of Network Reliability Engineering. In this lesson, we'll cover the basics of a Linux-based system, and get you acquainted with the Bash shell. slug: Linux -utilities: +endpoints: - name: linux1 image: antidotelabs/utility + presentations: + - name: cli + port: 22 + type: ssh stages: - id: 1 diff --git a/lessons/lesson-12/lessondiagram.png b/lessons/lesson-12/lessondiagram.png deleted file mode 100644 index 9f3f7b96..00000000 Binary files a/lessons/lesson-12/lessondiagram.png and /dev/null differ diff --git a/lessons/lesson-15/actions.png b/lessons/lesson-15/actions.png deleted file mode 100644 index 8bf70ecb..00000000 Binary files a/lessons/lesson-15/actions.png and /dev/null differ diff --git a/lessons/lesson-15/base.png b/lessons/lesson-15/base.png deleted file mode 100644 index 7b449f4d..00000000 Binary files a/lessons/lesson-15/base.png and /dev/null differ diff --git a/lessons/lesson-15/lessondiagram.png b/lessons/lesson-15/lessondiagram.png deleted file mode 100644 index 9f3f7b96..00000000 Binary files a/lessons/lesson-15/lessondiagram.png and /dev/null differ diff --git a/lessons/lesson-15/rules.png b/lessons/lesson-15/rules.png deleted file mode 100644 index 12c583b4..00000000 Binary files a/lessons/lesson-15/rules.png and /dev/null differ diff --git a/lessons/lesson-15/sensors.png b/lessons/lesson-15/sensors.png deleted file mode 100644 index 31f5369f..00000000 Binary files a/lessons/lesson-15/sensors.png and /dev/null differ diff --git a/lessons/lesson-15/workflows.png b/lessons/lesson-15/workflows.png deleted file mode 100644 index f85513e8..00000000 Binary files a/lessons/lesson-15/workflows.png and /dev/null differ diff --git a/lessons/lesson-19/lessondiagram.png b/lessons/lesson-19/lessondiagram.png deleted file mode 100644 index 9f3f7b96..00000000 Binary files a/lessons/lesson-19/lessondiagram.png and /dev/null differ diff --git a/lessons/lesson-21/lessondiagram.png b/lessons/lesson-21/lessondiagram.png deleted file mode 100644 index 238fd818..00000000 Binary files a/lessons/lesson-21/lessondiagram.png and /dev/null differ diff --git a/lessons/lesson-29/lessondiagram.png b/lessons/lesson-29/lessondiagram.png deleted file mode 100644 index 73501ab6..00000000 Binary files a/lessons/lesson-29/lessondiagram.png and /dev/null differ diff --git a/lessons/lesson-30/salt.png b/lessons/lesson-30/salt.png deleted file mode 100644 index 90bd6ed2..00000000 Binary files a/lessons/lesson-30/salt.png and /dev/null differ diff --git a/lessons/lesson-31/lessondiagram.png b/lessons/lesson-31/lessondiagram.png deleted file mode 100644 index bc1fda91..00000000 Binary files a/lessons/lesson-31/lessondiagram.png and /dev/null differ diff --git a/lessons/lesson-31/stage1/terraformbasics.png b/lessons/lesson-31/stage1/terraformbasics.png deleted file mode 100644 index c6c6ed53..00000000 Binary files a/lessons/lesson-31/stage1/terraformbasics.png and /dev/null differ diff --git a/lessons/lesson-31/stage2/plangraph.png b/lessons/lesson-31/stage2/plangraph.png deleted file mode 100644 index 24bcc5ca..00000000 Binary files a/lessons/lesson-31/stage2/plangraph.png and /dev/null differ diff --git a/lessons/lesson-32/lessondiagram.png b/lessons/lesson-32/lessondiagram.png deleted file mode 100644 index 9f3f7b96..00000000 Binary files a/lessons/lesson-32/lessondiagram.png and /dev/null differ diff --git a/lessons/lesson-35/lessondiagram.png b/lessons/lesson-35/lessondiagram.png deleted file mode 100644 index ca8cde25..00000000 Binary files a/lessons/lesson-35/lessondiagram.png and /dev/null differ diff --git a/lessons/tools/lesson-12-jsnapy/lesson.meta.yaml b/lessons/tools/lesson-12-jsnapy/lesson.meta.yaml index 0cc1233a..b9d2b3a0 100644 --- a/lessons/tools/lesson-12-jsnapy/lesson.meta.yaml +++ b/lessons/tools/lesson-12-jsnapy/lesson.meta.yaml @@ -2,7 +2,7 @@ lessonName: Network Unit Testing with JSNAPY lessonId: 12 category: tools -lessonDiagram: https://raw.githubusercontent.com/nre-learning/nrelabs-curriculum/master/lessons/lesson-12/lessondiagram.png +lessonDiagram: https://raw.githubusercontent.com/nre-learning/nrelabs-curriculum/v0.3.2/lessons/lesson-12/lessondiagram.png tier: prod prereqs: - 14 # YAML @@ -16,17 +16,37 @@ tags: - testing collection: 1 -utilities: +endpoints: - name: linux1 image: antidotelabs/utility + presentations: + - name: cli + port: 22 + type: ssh -devices: - name: vqfx1 image: antidotelabs/vqfx:snap1 + configurationType: napalm-junos + presentations: + - name: cli + port: 22 + type: ssh + - name: vqfx2 image: antidotelabs/vqfx:snap2 + configurationType: napalm-junos + presentations: + - name: cli + port: 22 + type: ssh + - name: vqfx3 image: antidotelabs/vqfx:snap3 + configurationType: napalm-junos + presentations: + - name: cli + port: 22 + type: ssh connections: - a: vqfx1 diff --git a/lessons/tools/lesson-13-napalm/lesson.meta.yaml b/lessons/tools/lesson-13-napalm/lesson.meta.yaml index 0f80d6e9..d304f307 100644 --- a/lessons/tools/lesson-13-napalm/lesson.meta.yaml +++ b/lessons/tools/lesson-13-napalm/lesson.meta.yaml @@ -16,13 +16,21 @@ tags: - network automation - napalm -utilities: +endpoints: - name: linux1 image: antidotelabs/utility + presentations: + - name: cli + port: 22 + type: ssh -devices: - name: vqfx1 image: antidotelabs/vqfx:snap1 + configurationType: napalm-junos + presentations: + - name: cli + port: 22 + type: ssh stages: - id: 1 diff --git a/lessons/tools/lesson-15-stackstorm/lesson.meta.yaml b/lessons/tools/lesson-15-stackstorm/lesson.meta.yaml index d10fcba5..d90049a6 100644 --- a/lessons/tools/lesson-15-stackstorm/lesson.meta.yaml +++ b/lessons/tools/lesson-15-stackstorm/lesson.meta.yaml @@ -3,7 +3,7 @@ lessonName: Event-Driven Network Automation with StackStorm lessonId: 15 category: tools tier: prod -lessonDiagram: https://raw.githubusercontent.com/nre-learning/nrelabs-curriculum/master/lessons/lesson-15/lessondiagram.png +lessonDiagram: https://raw.githubusercontent.com/nre-learning/nrelabs-curriculum/v0.3.2/lessons/lesson-15/lessondiagram.png lessonVideo: https://www.youtube.com/embed/WhfAqnn2HMM prereqs: - 13 # NAPALM @@ -17,28 +17,37 @@ tags: - stackstorm - st2 -# iframeResources: -# - ref: selfservice -# protocol: http -# path: "/" -# port: 5000 - -# blackboxes: -# - name: selfservice -# image: antidotelabs/selfservice-flask-app -# ports: [5000] - -utilities: +endpoints: - name: st2 image: antidotelabs/stackstorm + presentations: + - name: cli + port: 22 + type: ssh -devices: - name: vqfx1 image: antidotelabs/vqfx:snap1 + configurationType: napalm-junos + presentations: + - name: cli + port: 22 + type: ssh + - name: vqfx2 image: antidotelabs/vqfx:snap2 + configurationType: napalm-junos + presentations: + - name: cli + port: 22 + type: ssh + - name: vqfx3 image: antidotelabs/vqfx:snap3 + configurationType: napalm-junos + presentations: + - name: cli + port: 22 + type: ssh connections: - a: vqfx1 diff --git a/lessons/tools/lesson-15-stackstorm/stage1/guide.md b/lessons/tools/lesson-15-stackstorm/stage1/guide.md index 3cc6994b..9b712a2b 100644 --- a/lessons/tools/lesson-15-stackstorm/stage1/guide.md +++ b/lessons/tools/lesson-15-stackstorm/stage1/guide.md @@ -6,7 +6,7 @@ In this lesson, we'll explore the use of a powerful, open-source framework called StackStorm for event-driven automation within a networking context. For a primer on event-driven automation, as well as a very brief overview of the concepts in StackStorm, it's highly recommended that you start with the lesson video by clicking the button above. -
+
In this lesson, we'll be interacting with StackStorm using its command-line utility `st2`, so in this first lab, we'll take a moment to overview this, as well as how StackStorm integrates with other systems through something called `packs`. diff --git a/lessons/tools/lesson-15-stackstorm/stage2/guide.md b/lessons/tools/lesson-15-stackstorm/stage2/guide.md index 5f708411..3bb46064 100644 --- a/lessons/tools/lesson-15-stackstorm/stage2/guide.md +++ b/lessons/tools/lesson-15-stackstorm/stage2/guide.md @@ -14,7 +14,7 @@ Though it's important to understand that StackStorm is all about event-driven au There are many others - and the list is growing all the time in the StackStorm [Exchange](https://exchange.stackstorm.org/). In short, Actions can be thought of simply as neatly contained bits of code to perform a task. They accept input, do work, and usually provide some output. They're the very last piece in the chain we'll be building to create an end-to-end event-driven automation solution in this lesson. -
+
Many of the `st2` subcommands we saw in the previous lab use verbs like `get`, `create`, `delete`, `list` for their corresponding resources. For instance, to list the available actions that are currently present on our system, we can run: diff --git a/lessons/tools/lesson-15-stackstorm/stage3/guide.md b/lessons/tools/lesson-15-stackstorm/stage3/guide.md index ec212f36..3146d4a7 100644 --- a/lessons/tools/lesson-15-stackstorm/stage3/guide.md +++ b/lessons/tools/lesson-15-stackstorm/stage3/guide.md @@ -8,7 +8,7 @@ Just like real "tasks" performed manually, or via another tool, StackStorm Actio In StackStorm, we call these complex logical structures ["Workflows"](https://docs.stackstorm.com/workflows.html). -
+
There are a few options for accomplishing this in StackStorm: diff --git a/lessons/tools/lesson-15-stackstorm/stage4/guide.md b/lessons/tools/lesson-15-stackstorm/stage4/guide.md index f685f870..f2843d7b 100644 --- a/lessons/tools/lesson-15-stackstorm/stage4/guide.md +++ b/lessons/tools/lesson-15-stackstorm/stage4/guide.md @@ -16,7 +16,7 @@ In order for StackStorm to know when a certain "event" has taken place, it needs StackStorm uses something called `sensors` to do this. These are little bits of Python code that run as separate processes within StackStorm. -
+
As with everything else, Sensors are distributed within Packs. We can run the following command to see the list of sensors in the `napalm` pack: diff --git a/lessons/tools/lesson-15-stackstorm/stage5/guide.md b/lessons/tools/lesson-15-stackstorm/stage5/guide.md index f3186941..758fd824 100644 --- a/lessons/tools/lesson-15-stackstorm/stage5/guide.md +++ b/lessons/tools/lesson-15-stackstorm/stage5/guide.md @@ -6,7 +6,7 @@ And now, all of the concepts we've learned thus far come together. In this lesson we'll explore how *[Rules](https://docs.stackstorm.com/rules.html)* allow us to link the events that are reported to StackStorm via Sensors and Triggers, to the actions we want to take in response to those events in Actions and Workflows. Rules are the missing link in this chain. -
+
With Rules, we are declaring to StackStorm what events we care about (in the form of Triggers), and what action we want to take in response to seeing those events. In this lab, we'll create a Rule that responds to the Triggers we saw in the previous lab (`napalm.InterfaceDown`) and replaces the interface configuration on the affected device to turn the interface back up again. diff --git a/lessons/tools/lesson-18-todd/lesson.meta.yaml b/lessons/tools/lesson-18-todd/lesson.meta.yaml index 609fdd4e..dee8deb9 100644 --- a/lessons/tools/lesson-18-todd/lesson.meta.yaml +++ b/lessons/tools/lesson-18-todd/lesson.meta.yaml @@ -11,15 +11,29 @@ tags: description: ToDD is a Distributed Network-Service-Level Assertion Engine. In this lesson, we'll learn about how to use ToDD to run distributed data-plane tests and assertions on our network. slug: ToDD -utilities: +endpoints: - name: todd1 image: toddproject/todd + presentations: + - name: cli + port: 80 + type: ssh + - name: web1 image: nginx + presentations: + - name: web + port: 80 + type: http -devices: - name: vqfx1 image: antidotelabs/vqfx:snap1 + configurationType: napalm-junos + presentations: + - name: cli + port: 22 + type: ssh + connections: - a: todd1 diff --git a/lessons/tools/lesson-24-pyez/lesson.meta.yaml b/lessons/tools/lesson-24-pyez/lesson.meta.yaml index 7836a85d..c4f44349 100644 --- a/lessons/tools/lesson-24-pyez/lesson.meta.yaml +++ b/lessons/tools/lesson-24-pyez/lesson.meta.yaml @@ -16,14 +16,23 @@ tags: - library collection: 1 -utilities: -- name: linux - image: antidotelabs/utility +endpoints: -devices: - name: vqfx image: antidotelabs/vqfx:snap1 - ports: [830] + configurationType: napalm-junos + presentations: + - name: cli + port: 22 + type: ssh + additionalPorts: [830] + +- name: linux + image: antidotelabs/utility + presentations: + - name: cli + port: 22 + type: ssh connections: - a: vqfx diff --git a/lessons/tools/lesson-25-junosjet/lesson.meta.yaml b/lessons/tools/lesson-25-junosjet/lesson.meta.yaml index bf9351f0..c1b7dc9b 100644 --- a/lessons/tools/lesson-25-junosjet/lesson.meta.yaml +++ b/lessons/tools/lesson-25-junosjet/lesson.meta.yaml @@ -7,17 +7,23 @@ tier: ptr slug: jet collection: 1 -utilities: +endpoints: + - name: linux image: antidotelabs/utility + presentations: + - name: cli + port: 22 + type: ssh -devices: - name: vqfx image: antidotelabs/vqfx-full:18.1R1.9 - ports: - - 830 - - 1883 - - 32767 + configurationType: napalm-junos + presentations: + - name: cli + port: 22 + type: ssh + additionalPorts: [830, 1883, 32767] connections: - a: vqfx diff --git a/lessons/tools/lesson-26-openconfig/lesson.meta.yaml b/lessons/tools/lesson-26-openconfig/lesson.meta.yaml index 868e3ba9..5fec064f 100644 --- a/lessons/tools/lesson-26-openconfig/lesson.meta.yaml +++ b/lessons/tools/lesson-26-openconfig/lesson.meta.yaml @@ -6,15 +6,23 @@ tier: ptr description: "In this lesson, we'll explore OpenConfig - an industry effort to standardize network configuration and telemetry models" slug: openconfig -utilities: +endpoints: + - name: linux image: antidotelabs/utility + presentations: + - name: cli + port: 22 + type: ssh -devices: - name: vqfx image: antidotelabs/vqfx-full:18.1R1.9 - ports: - - 830 + configurationType: napalm-junos + presentations: + - name: cli + port: 22 + type: ssh + additionalPorts: [830] connections: - a: vqfx diff --git a/lessons/tools/lesson-29-robot/lesson.meta.yaml b/lessons/tools/lesson-29-robot/lesson.meta.yaml index f4176443..3b051754 100644 --- a/lessons/tools/lesson-29-robot/lesson.meta.yaml +++ b/lessons/tools/lesson-29-robot/lesson.meta.yaml @@ -2,7 +2,7 @@ lessonName: Using Robot Framework for Automated Testing lessonId: 29 category: tools -lessondiagram: https://raw.githubusercontent.com/nre-learning/nrelabs-curriculum/master/lessons/lesson-29/lessondiagram.png +lessondiagram: https://raw.githubusercontent.com/nre-learning/nrelabs-curriculum/v0.3.2/lessons/lesson-29/lessondiagram.png tier: prod prereqs: - 24 # PyEZ @@ -12,13 +12,21 @@ tags: - robot - testing -utilities: +endpoints: - name: linux1 image: antidotelabs/utility + presentations: + - name: cli + port: 22 + type: ssh -devices: - name: vqfx1 image: antidotelabs/vqfx:snap1 + configurationType: napalm-junos + presentations: + - name: cli + port: 22 + type: ssh connections: - a: vqfx1 diff --git a/lessons/tools/lesson-30-salt/lesson.meta.yaml b/lessons/tools/lesson-30-salt/lesson.meta.yaml index 79b6df41..e917f4f7 100644 --- a/lessons/tools/lesson-30-salt/lesson.meta.yaml +++ b/lessons/tools/lesson-30-salt/lesson.meta.yaml @@ -2,7 +2,7 @@ lessonName: Network Automation with Salt lessonId: 30 category: tools -lessondiagram: https://raw.githubusercontent.com/nre-learning/nrelabs-curriculum/master/lessons/lesson-30/salt.png +lessondiagram: https://raw.githubusercontent.com/nre-learning/nrelabs-curriculum/v0.3.2/lessons/lesson-30/salt.png tier: prod prereqs: - 22 # Python @@ -15,15 +15,23 @@ tags: - salt - saltstack -utilities: +endpoints: + - name: salt1 image: antidotelabs/salt - ports: [22] + presentations: + - name: cli + port: 22 + type: ssh -devices: - name: vqfx1 image: antidotelabs/vqfx:snap1 - ports: [8080, 830] + configurationType: napalm-junos + presentations: + - name: cli + port: 22 + type: ssh + additionalPorts: [8080, 830] connections: - a: vqfx1 diff --git a/lessons/tools/lesson-31-terraform/lesson.meta.yaml b/lessons/tools/lesson-31-terraform/lesson.meta.yaml index fa8d746f..8d1cb53b 100644 --- a/lessons/tools/lesson-31-terraform/lesson.meta.yaml +++ b/lessons/tools/lesson-31-terraform/lesson.meta.yaml @@ -2,7 +2,7 @@ lessonName: Terraform & Junos lessonId: 31 category: tools -lessonDiagram: https://raw.githubusercontent.com/nre-learning/nrelabs-curriculum/master/lessons/lesson-31/lessondiagram.png +lessonDiagram: https://raw.githubusercontent.com/nre-learning/nrelabs-curriculum/v0.3.2/lessons/lesson-31/lessondiagram.png description: Terraform provides a declarative way of managing resources and now you can experiment with controlling Junos resources through this exciting lesson! tier: prod slug: Terraform @@ -11,17 +11,37 @@ tags: - declarative - junos -utilities: +endpoints: - name: terraform1 image: antidotelabs/terraform + presentations: + - name: cli + port: 22 + type: ssh -devices: - name: vqfx1 image: antidotelabs/vqfx:snap1 + configurationType: napalm-junos + presentations: + - name: cli + port: 22 + type: ssh + - name: vqfx2 image: antidotelabs/vqfx:snap2 + configurationType: napalm-junos + presentations: + - name: cli + port: 22 + type: ssh + - name: vqfx3 image: antidotelabs/vqfx:snap3 + configurationType: napalm-junos + presentations: + - name: cli + port: 22 + type: ssh connections: - a: vqfx1 diff --git a/lessons/tools/lesson-31-terraform/stage1/guide.md b/lessons/tools/lesson-31-terraform/stage1/guide.md index c9f644cc..c5104a31 100644 --- a/lessons/tools/lesson-31-terraform/stage1/guide.md +++ b/lessons/tools/lesson-31-terraform/stage1/guide.md @@ -9,7 +9,7 @@ Infrastructure-as-Code Terraform resources are declarative versions of the netwo Don't forget your network chops in this lesson. You'll configure an interface, a BGP peer, a VLAN and a L3 interface for the VLAN. You can exercise your networking powers here and validate what Terraform does as it does it on `vqfx1`. -![Terraform](https://raw.githubusercontent.com/nre-learning/nrelabs-curriculum/master/lessons/lesson-31/stage1/terraformbasics.png) +![Terraform](https://raw.githubusercontent.com/nre-learning/nrelabs-curriculum/v0.3.2/lessons/lesson-31/stage1/terraformbasics.png) *Image borrowed from the Terraform website: terraform.io* diff --git a/lessons/tools/lesson-31-terraform/stage2/guide.md b/lessons/tools/lesson-31-terraform/stage2/guide.md index 2b43a73f..37007afe 100644 --- a/lessons/tools/lesson-31-terraform/stage2/guide.md +++ b/lessons/tools/lesson-31-terraform/stage2/guide.md @@ -53,6 +53,6 @@ This next step creates a PNG file containing the output. However, other than cre terraform graph -type=plan | dot -Tpng > plan_graph.png ``` -
+
*The Terraform terraform-provider-junos-qfx is covered by a BSD-3-Clause license and copyrighted by Juniper Networks* diff --git a/lessons/workflows/lesson-21-tshoot-ipphone/lesson.meta.yaml b/lessons/workflows/lesson-21-tshoot-ipphone/lesson.meta.yaml index 4cf12161..a531ca42 100644 --- a/lessons/workflows/lesson-21-tshoot-ipphone/lesson.meta.yaml +++ b/lessons/workflows/lesson-21-tshoot-ipphone/lesson.meta.yaml @@ -2,7 +2,7 @@ lessonName: Automating the Troubleshooting Chain lessonId: 21 category: workflows -lessondiagram: https://raw.githubusercontent.com/nre-learning/nrelabs-curriculum/master/lessons/lesson-21/lessondiagram.png +lessondiagram: https://raw.githubusercontent.com/nre-learning/nrelabs-curriculum/v0.3.2/lessons/lesson-21/lessondiagram.png tier: prod prereqs: - 22 # Python @@ -13,28 +13,53 @@ tags: - troubleshooting - tshoot -blackboxes: -- name: asterisk - image: antidotelabs/asterisk - ports: [8088] -- name: netbox - image: antidotelabs/netbox - ports: [8000] +endpoints: +- name: linux1 + image: antidotelabs/utility + presentations: + - name: cli + port: 22 + type: ssh + +- name: sipphone + image: antidotelabs/pjsua-lindsey + presentations: + - name: cli + port: 22 + type: ssh -devices: - name: vqfx1 image: antidotelabs/vqfx:snap1 + configurationType: napalm-junos + presentations: + - name: cli + port: 22 + type: ssh + - name: vqfx2 image: antidotelabs/vqfx:snap2 + configurationType: napalm-junos + presentations: + - name: cli + port: 22 + type: ssh + - name: vqfx3 image: antidotelabs/vqfx:snap3 - -utilities: -- name: linux1 - image: antidotelabs/utility -- name: sipphone - image: antidotelabs/pjsua-lindsey - ports: [22] + configurationType: napalm-junos + presentations: + - name: cli + port: 22 + type: ssh + +- name: asterisk + image: antidotelabs/asterisk + additionalPorts: [8088] + +- name: netbox + image: antidotelabs/netbox + additionalPorts: [8000] + connections: - a: vqfx1 diff --git a/lessons/workflows/lesson-32-stigcompliance/lesson.meta.yaml b/lessons/workflows/lesson-32-stigcompliance/lesson.meta.yaml index 549846e5..5f1ee220 100644 --- a/lessons/workflows/lesson-32-stigcompliance/lesson.meta.yaml +++ b/lessons/workflows/lesson-32-stigcompliance/lesson.meta.yaml @@ -2,7 +2,7 @@ lessonName: Automated STIG Compliance Validation lessonId: 32 category: workflows -lessonDiagram: https://raw.githubusercontent.com/nre-learning/nrelabs-curriculum/master/lessons/lesson-32/lessondiagram.png +lessonDiagram: https://raw.githubusercontent.com/nre-learning/nrelabs-curriculum/v0.3.2/lessons/lesson-32/lessondiagram.png tier: prod prereqs: - 13 # NAPALM @@ -14,13 +14,21 @@ tags: - napalm - stig -utilities: +endpoints: - name: linux1 image: antidotelabs/utility + presentations: + - name: cli + port: 22 + type: ssh -devices: - name: vqfx1 image: antidotelabs/vqfx:snap1 + configurationType: napalm-junos + presentations: + - name: cli + port: 22 + type: ssh stages: - id: 1 diff --git a/lessons/workflows/lesson-33-quickdeviceinventory/lesson.meta.yaml b/lessons/workflows/lesson-33-quickdeviceinventory/lesson.meta.yaml index b237c3a5..2c8bb0f5 100644 --- a/lessons/workflows/lesson-33-quickdeviceinventory/lesson.meta.yaml +++ b/lessons/workflows/lesson-33-quickdeviceinventory/lesson.meta.yaml @@ -14,17 +14,32 @@ tags: - facts - yaml -utilities: +endpoints: + - name: linux1 image: antidotelabs/utility + presentations: + - name: cli + port: 22 + type: ssh -devices: - name: vqfx1 image: antidotelabs/vqfx:snap1 - ports: [830] + configurationType: napalm-junos + presentations: + - name: cli + port: 22 + type: ssh + additionalPorts: [830] + - name: vqfx2 image: antidotelabs/vqfx:snap2 - ports: [830] + configurationType: napalm-junos + presentations: + - name: cli + port: 22 + type: ssh + additionalPorts: [830] stages: - id: 1 diff --git a/lessons/workflows/lesson-34-configbackup/lesson.meta.yaml b/lessons/workflows/lesson-34-configbackup/lesson.meta.yaml index 5e3042cd..58b62414 100644 --- a/lessons/workflows/lesson-34-configbackup/lesson.meta.yaml +++ b/lessons/workflows/lesson-34-configbackup/lesson.meta.yaml @@ -14,17 +14,32 @@ tags: - facts - yaml -utilities: +endpoints: + - name: linux1 image: antidotelabs/utility + presentations: + - name: cli + port: 22 + type: ssh -devices: - name: vqfx1 image: antidotelabs/vqfx:snap1 - ports: [830] + configurationType: napalm-junos + presentations: + - name: cli + port: 22 + type: ssh + additionalPorts: [830] + - name: vqfx2 image: antidotelabs/vqfx:snap2 - ports: [830] + configurationType: napalm-junos + presentations: + - name: cli + port: 22 + type: ssh + additionalPorts: [830] stages: - id: 1 diff --git a/lessons/workflows/lesson-35-devicespecifictemplate/lesson.meta.yaml b/lessons/workflows/lesson-35-devicespecifictemplate/lesson.meta.yaml index 7a7e4bda..8bd5b504 100644 --- a/lessons/workflows/lesson-35-devicespecifictemplate/lesson.meta.yaml +++ b/lessons/workflows/lesson-35-devicespecifictemplate/lesson.meta.yaml @@ -1,7 +1,7 @@ --- lessonName: Device Specific Template Generation lessonId: 35 -lessonDiagram: https://raw.githubusercontent.com/nre-learning/nrelabs-curriculum/master/lessons/lesson-35/lessondiagram.png +lessonDiagram: https://raw.githubusercontent.com/nre-learning/nrelabs-curriculum/v0.3.2/lessons/lesson-35/lessondiagram.png category: workflows tier: prod prereqs: @@ -15,17 +15,32 @@ tags: - yaml - jinja2 -utilities: +endpoints: + - name: linux image: antidotelabs/utility + presentations: + - name: cli + port: 22 + type: ssh -devices: - name: vqfx1 image: antidotelabs/vqfx:snap1 - ports: [830] + configurationType: napalm-junos + presentations: + - name: cli + port: 22 + type: ssh + additionalPorts: [830] + - name: vqfx2 image: antidotelabs/vqfx:snap2 - ports: [830] + configurationType: napalm-junos + presentations: + - name: cli + port: 22 + type: ssh + additionalPorts: [830] stages: - id: 1