Adding a Message of the Day (MOTD)
You can create a message of the day (MOTD) JSON file to be provide an MOTD file to our product containers when they start.
Before you begin
You must:
-
Complete the Get Started example to set up your DevOps environment and run a test deployment of the products.
Using a MOTD file
To employ a MOTD file:
-
Edit the existing
motd.jsonfile:-
Edit the motd/motd.json file located in your local
pingidentity-devops-getting-started/motdfolder.
-
-
Create a
motd.jsonfile in the location of your server profile:-
Create a
motd.jsonfile in the root of the server profile directory being referenced.
This
motd.jsonfile will be appended to the/etc/motdfile used by the provided image. -
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 container.
-
To test the
motd.jsonfile locally for our example use cases, from thepingidentity-devops-getting-started/motddirectory, enter:./test-motd.sh local -
To test the
motd.jsonfile you created in your server profile directory:-
Copy the
test-motd.shscript located in thepingidentity-devops-getting-started/motddirectory to your server profile directory. -
Enter:
./test-motd.sh local
-
-
To test the
motd.jsonwith a server profile located in a Github repository:-
Ensure the
test-motd.shscript 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": 20220701,
"validTo": 20220730,
"subject": "General Message 1",
"message": [
"This is line # 1",
"",
"This is line # 3"
]
},
{
"validFrom": 20220801,
"validTo": 20220830,
"subject": "General Message 2",
"message": ["Message goes here"]
}
],
"pingfederate" : [
{
"validFrom": 20220701,
"validTo": 20220830,
"subject": "PingFederate Message 1",
"message": ["Message goes here"]
}
]
}