diff --git a/Dockerfile b/Dockerfile index bdfc54df77a1e73cbadacae476e74e59fa6b41d0..52bd719230c2d1dc66818c9ae2ab16751ec6746e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,5 +17,7 @@ RUN pip2 install webob routes pyyaml requests RUN python setup.py build RUN python setup.py install +RUN mkdir /ztp-root + EXPOSE 8080/TCP ENTRYPOINT /usr/local/bin/ztps diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000000000000000000000000000000000000..b28a084b5e8ec819a82252885e06fe4dc5a88461 --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,13 @@ +version: '3' +services: + ztpserver: + image: registry.code.fbi.h-da.de/danet/ztpserver-docker + container_name: ztpserver + ports: + - 0.0.0.0:8080:8080 + restart: unless-stopped + volumes: + - ./ztp-root:/ztp-root + - ./ztpserver:/etc/ztpserver + depends_on: + - dss-backend \ No newline at end of file diff --git a/ztp-root/actions/.gitkeep b/ztp-root/actions/.gitkeep new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/ztp-root/bootstrap/.gitkeep b/ztp-root/bootstrap/.gitkeep new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/ztp-root/definitions/.gitkeep b/ztp-root/definitions/.gitkeep new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/ztp-root/files/.gitkeep b/ztp-root/files/.gitkeep new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/ztp-root/neighbordb/.gitkeep b/ztp-root/neighbordb/.gitkeep new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/ztp-root/nodes/.gitkeep b/ztp-root/nodes/.gitkeep new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/ztp-root/resources/.gitkeep b/ztp-root/resources/.gitkeep new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/ztpserver/ztpserver.conf b/ztpserver/ztpserver.conf new file mode 100644 index 0000000000000000000000000000000000000000..bde10505141b5787b7a8a82646e26551a3435627 --- /dev/null +++ b/ztpserver/ztpserver.conf @@ -0,0 +1,52 @@ +[default] + +# Location of all ztps boostrap process data files +# default= /usr/share/ztpserver +data_root=/ztp-root + +# UID used in the /nodes structure +# default=serialnum +#identifier=<serialnum | systemmac> + +# Server URL to-be-advertised to clients (via POST replies) during the bootstrap process +# default=http://ztpserver:8080 +#server_url=<URL> + +# Enable local logging +# default=True +#logging=<True | False> + +# Enable console logging +# default=True +#console_logging=<True | False> + +# Console logging format +# default=%(asctime)-15s:%(levelname)s:[%(module)s:%(lineno)d] %(message)s +#console_logging_format=<(Python)logging format> + +# Globally disable topology validation in the bootstrap process +# default=False +#disable_topology_validation=<True | False> + +[server] +# Note: this section only applies to using the standalone server. If +# running under a WSGI server, these values are ignored + +# Interface to which the server will bind to (0:0:0:0 will bind to +# all available IPv4 addresses on the local machine) +# default=0.0.0.0 +#interface=<IP addr> + +# TCP listening port +# default=8080 +#port=<TCP port> + +[bootstrap] +# Bootstrap filename (file located in <data_root>/bootstrap) +# default=bootstrap +#filename=<name> + +[neighbordb] +# Neighbordb filename (file located in <data_root>) +# default=neighbordb +#filename=<name>