Adding a 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.json
file:- Edit the motd/motd.json file located in your local
pingidentity-devops-getting-started/motd
folder.
- Edit the motd/motd.json file located in your local
-
Create a
motd.json
file in the location of your server profile:- Create a
motd.json
file in the root of the server profile directory being referenced.
This
motd.json
file will be appended to the/etc/motd
file used by the provided image. - Create a
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.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": 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"]
}
]
}