Skip to content

Commit

Permalink
Updating dependencies to fix dependabot issues. Instructions updated …
Browse files Browse the repository at this point in the history
…as well
  • Loading branch information
jillesca committed Sep 5, 2023
1 parent 377f848 commit ce975ea
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 44 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ Either manually stop and wipe the existing lab and then import the [cml topology

Or run the cml container. _If first time, it will take around 5min to be ready. Manual option could be faster._

> The cml container assumes the default lab is called '_Multi Platform Network_' in cml. If this is not the case, update the [build_run_cml.sh script with the corresponding name](build_run_cml.sh#24)
```bash
chmod +x build_run_cml.sh
bash build_run_cml.sh
Expand Down Expand Up @@ -149,6 +151,15 @@ Then you need to tell telegraf, which configuration file it should use under [ne

Rebuild the container using `bash build_run_telegraf.sh`

## Tear down the lab

Remove any containers from your laptop with the commands below

```bash
docker rm -f cml telegraf influxdb grafana
docker volume rm influxdb
```

## .env.local file

The [.env.local file](.env.local) is used to define all variables used by the containers.
Expand Down
6 changes: 3 additions & 3 deletions build_run_cml.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ docker exec -it cml ansible-playbook cisco.cml.build -e startup='host' -e wait='



echo "\n################################"
echo "################################"
echo "To access the container use:"
echo "docker exec -it cml /bin/sh"
echo "################################\n"
echo "docker exec -it cml /bin/bash"
echo "################################"
4 changes: 2 additions & 2 deletions build_run_grafana.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ docker build --file grafana/dockerfile \

docker run -itd -p 3000:3000 --name grafana --add-host host.docker.internal:host-gateway grafana:$GRAFANA_TAG

echo "\n################################"
echo "################################"
echo "To access the container use:"
echo "docker exec -it grafana bash"
echo "################################\n"
echo "################################"
4 changes: 2 additions & 2 deletions build_run_influxdb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ docker build \

docker run -itd -p 8086:8086 --volume influxdb:/var/lib/influxdb2 --name influxdb --add-host host.docker.internal:host-gateway influxdb:$INFLUXDB_TAG

echo "\n################################"
echo "################################"
echo "To access the container use:"
echo "docker exec -it influxdb bash"
echo "################################\n"
echo "################################"
4 changes: 2 additions & 2 deletions build_run_telegraf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ docker run -itd -p 57500:57500 --name telegraf \
--add-host host.docker.internal:host-gateway telegraf:$TELEGRAF_TAG
# -v ${PWD}/netconf_client:/opt/netconf_client/ \

echo "\n################################"
echo "################################"
echo "To access the container use:"
echo "docker exec -it telegraf bash"
echo "################################\n"
echo "################################"
29 changes: 12 additions & 17 deletions cml/dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
# syntax=docker/dockerfile:1
# FROM python:alpine3.16 AS base
# COPY ./cml/requirements.txt .
# RUN apk add \
# gcc \
# musl-dev \
# linux-headers \
# libssh-dev \
# openssh-client \
# && pip install --upgrade pip \
# && pip3 install -r requirements.txt \
# && pip install virl2-client==2.5.0 \
# && ansible-galaxy collection install cisco.cml
# WORKDIR /home

FROM jillesca/ansible:cml1.1 as base

RUN pip install virl2-client==2.5.0 \
FROM python:alpine3.16 AS base
COPY ./cml/requirements.txt .
RUN apk add \
gcc \
bash \
musl-dev \
libssh-dev \
linux-headers \
openssh-client \
&& pip install --upgrade pip \
&& pip install -r requirements.txt \
&& ansible-galaxy collection install cisco.cml
WORKDIR /home


FROM base as cml
Expand Down
26 changes: 8 additions & 18 deletions cml/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
ansible==6.5.0
ansible-core==2.13.5
ansible-pylibssh==1.0.0
certifi==2022.9.24
cffi==1.15.1
charset-normalizer==2.1.1
cryptography==38.0.1
idna==3.4
Jinja2==3.1.2
MarkupSafe==2.1.1
packaging==21.3
pycparser==2.21
pyparsing==3.0.9
PyYAML
requests==2.28.1
resolvelib==0.8.1
urllib3==1.26.12
paramiko==2.11.0
ansible>=8.3.0
ansible-core>=2.15.3
Jinja2>=3.1.2
PyYAML>=6.0.1
requests>=2.31.0
urllib3>=2.0.4
paramiko>=3.3.1
virl2-client==2.5.0

0 comments on commit ce975ea

Please sign in to comment.