-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from trento-project/sapsystems
Add to the images the ability to mock sapsystems
- Loading branch information
Showing
9 changed files
with
206 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
FROM golang as agent-builder | ||
|
||
RUN git clone https://github.com/trento-project/agent.git | ||
ADD https://github.com/trento-project/agent.git agent | ||
RUN cd agent && make build | ||
|
||
FROM registry.suse.com/bci/bci-base | ||
RUN zypper -n in catatonit | ||
COPY --from=agent-builder /go/agent/trento-agent /usr/bin/trento-agent | ||
COPY --from=ghcr.io/dottorblaster/soappatrol:latest /bin/soappatrol /usr/bin/soappatrol | ||
COPY --from=ghcr.io/trento-project/fakemall:latest /bin/fakemall /usr/bin/fakemall | ||
COPY . / | ||
|
||
ENTRYPOINT ["/usr/bin/trento-agent", "start"] | ||
RUN useradd -ms /bin/bash mckadm | ||
|
||
ENTRYPOINT ["catatonit", "--", "/init.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
[[request]] | ||
action = "''" | ||
tagname = "GetInstanceProperties" | ||
response = """ | ||
<GetInstancePropertiesResponse xmlns="urn:SAPControl"> | ||
<properties> | ||
<item> | ||
<property>INSTANCE_NAME</property> | ||
<propertytype>string</propertytype> | ||
<value>MCK00</value> | ||
</item> | ||
<item> | ||
<property>SAPLOCALHOST</property> | ||
<propertytype>string</propertytype> | ||
<value>hana_node01</value> | ||
</item> | ||
<item> | ||
<property>SAPSYSTEM</property> | ||
<propertytype>string</propertytype> | ||
<value>00</value> | ||
</item> | ||
<item> | ||
<property>SAPSYSTEMNAME</property> | ||
<propertytype>string</propertytype> | ||
<value>MCK</value> | ||
</item> | ||
</properties> | ||
</GetInstancePropertiesResponse> | ||
""" | ||
|
||
[[request]] | ||
action = "''" | ||
tagname = "GetProcessList" | ||
response = """ | ||
<GetProcessListResponse xmlns="urn:SAPControl"> | ||
<process> | ||
<item> | ||
<name>MockProcess</name> | ||
<description>Mock process</description> | ||
<dispstatus>SAPControl-GREEN</dispstatus> | ||
<textstatus>ok</textstatus> | ||
<starttime>12:00</starttime> | ||
<endtime>12:01</endtime> | ||
<pid>123</pid> | ||
</item> | ||
</process> | ||
</GetProcessListResponse> | ||
""" | ||
|
||
[[request]] | ||
action = "''" | ||
tagname = "GetSystemInstanceList" | ||
response = """ | ||
<GetSystemInstanceListResponse xmlns="urn:SAPControl"> | ||
<instance> | ||
<item> | ||
<hostname>hana_node01</hostname> | ||
<instanceNr>00</instanceNr> | ||
<httpPort>80</httpPort> | ||
<httpsPort>443</httpsPort> | ||
<startPriority>high</startPriority> | ||
<features>HDB</features> | ||
<dispstatus>SAPControl-GREEN</dispstatus> | ||
</item> | ||
</instance> | ||
</GetSystemInstanceListResponse> | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
set -m | ||
|
||
# Start the first process | ||
/usr/bin/soappatrol /tmp/.sapstream50013 /etc/soappatrol.toml & | ||
|
||
# Start the second process | ||
/usr/bin/trento-agent start & | ||
|
||
# Wait for any process to exit | ||
wait -n | ||
|
||
# Exit with status of process that exited first | ||
exit $? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/usr/bin/env sh | ||
fakemall exec /etc/config.toml "python $*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/usr/bin/env sh | ||
fakemall exec /etc/config.toml "sappfpar $*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/usr/bin/env sh | ||
fakemall exec /etc/config.toml "/usr/sap/MCK/MCK00/exe/hdbnsutil $*" |
1 change: 1 addition & 0 deletions
1
hana_node01/usr/sap/MCK/SYS/global/hdb/custom/config/nameserver.ini
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
id = systemId |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# DATABASE:CONTAINER:USER:GROUP:USERID:GROUPID:HOST:SQLPORT:ACTIVE | ||
PRD::::::hana_node01:30015:yes | ||
|
||
MCK::::::hana_node01:30044:yes |