diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..18ad4700 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +FROM centos:latest + +RUN dnf install -y git python3-pip gcc python3-devel + +RUN git clone https://opendev.org/openstack/validations-libs /root/validations-libs +RUN git clone https://opendev.org/openstack/validations-common /root/validations-common + +RUN cd /root/validations-libs && \ + pip3 install -r requirements.txt && \ + python3 setup.py install + +RUN cd /root/validations-common && \ + pip3 install -r requirements.txt && \ + python3 setup.py install + +RUN ln -s /usr/local/share/ansible /usr/share/ansible + +RUN mkdir -p /var/log/validations diff --git a/README.rst b/README.rst index 5e64b5dd..76c76ca0 100644 --- a/README.rst +++ b/README.rst @@ -1,10 +1,37 @@ -# validations-libs +================ +validations-libs +================ A collection of python libraries for the Validation Framework -## Development Environment Setup +Development Environment Setup +============================= Vagrantfiles for CentOS and Ubuntu have been provided for convenience; simply -copy one into your desired location and rename to `Vagrantfile`, then run -`vagrant up`. Once complete you will have a clean development environment +copy one into your desired location and rename to ``Vagrantfile``, then run:: + + vagrant up + +Once complete you will have a clean development environment ready to go for working with Validation Framework. + +Docker Quickstart +================= + +A Dockerfile is provided at the root of the Validations Library project in +order to quickly set and hack the Validation Framework. +Build the container from the Dockerfile by running:: + + docker build -t "vf:dockerfile" . + +Once the build is finished you can check the image id:: + + docker images + +Then you can run the container and start to run some builtin Validations:: + + docker run -ti /bin/bash + +Then run validations:: + + validation.py run --validation check-ftype,512e