blob: 2c874a627ec404d0d490ebe3e096f95c9498fff9 [file] [log] [blame]
Dinesh Belwalkar6c0bc752020-04-24 23:47:53 +00001# Copyright 2018-present Open Networking Foundation
2# Copyright 2018-present Edgecore Networks Corporation
Scott Bakerbdb962b2020-04-03 10:53:36 -07003#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16# To generate mockup, run this inside container:
17# 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
18
19# Deployment example to deploy two mock OLTs:
20# docker run -d -p 127.0.0.1:8401:8001 opencord/redfish-mockup-server:latest
21# docker run -d -p 127.0.0.1:8402:8001 opencord/redfish-mockup-server:latest
22
23FROM python:3.5.9
24RUN git clone --depth=1 --branch 1.0.9 https://github.com/DMTF/Redfish-Mockup-Server.git
25RUN git clone --depth=1 --branch 1.0.5 https://github.com/DMTF/Redfish-Mockup-Creator.git
26
27WORKDIR /Redfish-Mockup-Server
28RUN pip install -r requirements.txt
29
30COPY mockup ./mockup
31
32RUN 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"
33
34CMD python redfishMockupServer.py -H 0.0.0.0 -p 8001 -T -s --cert certificate.pem --key key.pem -D /Redfish-Mockup-Server/mockup