Adding a MOTD ¶
You can create a message of the day (MOTD) JSON file to be used to provide an MOTD file to our product containers when they start.
Before you begin ¶
You must:
- Complete Get Started to set up your DevOps environment and run a test deployment of the products.
Using a MOTD file ¶
You can employ a MOTD file in by either:
- Editing our existing
motd.json
file used by our example use cases -
Creating a
motd.json
file in the location of your server profile:- To use the MOTD with our example uses cases, edit the
motd/motd.json
file located in your localpingidentity-devops-getting-started/motd
. -
To use a MOTD file for your server profile, create a
motd.json
file in the directory where thedocker-compose.yaml
file you're using for the server profile is located.This
motd.json
file will be appended to the/etc/motd
file used by the DevOps image.
- To use the MOTD with our example uses cases, edit the
Testing the MOTD file ¶
Test the new messages in the motd.json
file using the test-motd.sh
script. The script supplies the JQ_EXPR
value used to pass the message data to the Devops image.
-
To test the
motd.json
file locally for our example use cases, from thepingidentity-devops-getting-started/motd
directory, enter:./test-motd.sh local
-
To test the
motd.json
file you created in your server profile directory:-
Copy the
test-motd.sh
script located in thepingidentity-devops-getting-started/motd
directory to your server profile directory. -
Enter:
./test-motd.sh local
-
-
To test the
motd.json
with a server profile located in a Github repository:-
Ensure the
test-motd.sh
script is located in the local, cloned repository. -
From the local, cloned repository, enter:
./test-motd.sh github
-
Example motd.json ¶
The example below shows the messages that are displayed for all product images.
For this example, the messages are only shown from the validFrom
to validTo
dates:
{
"devops" : [
{
"validFrom": 20190701,
"validTo": 20190730,
"subject": "General Message 1",
"message": ["This is line # 1",
"",
"This is line # 3",]
},
{
"validFrom": 20190801,
"validTo": 20190830,
"subject": "General Message 2",
"message": ["Message goes here"]
}
],
"pingfederate" : [
{
"validFrom": 20190701,
"validTo": 20190830,
"subject": "PingFederate Message 1",
"message": ["Message goes here"]
}
]
}