Scott Baker | bdb962b | 2020-04-03 10:53:36 -0700 | [diff] [blame^] | 1 | # copyright 2018-present Open Networking Foundation |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
| 15 | # To generate mockup, run this inside container: |
| 16 | # cd /Redfish-Mockup-Creator && mkdir mockup && python ./redfishMockupCreate.py -v -r 10.90.0.114:8888 -A None -S -D /Redfish-Mockup-Creator/mockup && tar -czf olt-redfish-mockup.tar.gz mockup/redfish |
| 17 | |
| 18 | # Deployment example to deploy two mock OLTs: |
| 19 | # docker run -d -p 127.0.0.1:8401:8001 opencord/redfish-mockup-server:latest |
| 20 | # docker run -d -p 127.0.0.1:8402:8001 opencord/redfish-mockup-server:latest |
| 21 | |
| 22 | FROM python:3.5.9 |
| 23 | RUN git clone --depth=1 --branch 1.0.9 https://github.com/DMTF/Redfish-Mockup-Server.git |
| 24 | RUN git clone --depth=1 --branch 1.0.5 https://github.com/DMTF/Redfish-Mockup-Creator.git |
| 25 | |
| 26 | WORKDIR /Redfish-Mockup-Server |
| 27 | RUN pip install -r requirements.txt |
| 28 | |
| 29 | COPY mockup ./mockup |
| 30 | |
| 31 | RUN openssl req -newkey rsa:2048 -nodes -keyout key.pem -x509 -days 365 -out certificate.pem -subj "/C=NL/ST=CA/L=Menlo/O=ONF/OU=Development/CN=redfish.mock.server" |
| 32 | |
| 33 | CMD python redfishMockupServer.py -H 0.0.0.0 -p 8001 -T -s --cert certificate.pem --key key.pem -D /Redfish-Mockup-Server/mockup |