Redis user permissions (ACL) and python connection

 Recently, I was working on setting up a redis cluster along with separate users for readwrite and readonly. I setup the readonly user using the below privileges (ACLs):   user redisreadonly on >mySuperSecretPassword ~* resetchannels -@all +@read +ping +asking   Once this is setup, I wrote a simple program in python to connect to the redis cluster using the readonly credentials and print the number of keys.   #!/usr/bin/env python3 """ pip3 install redis """ from redis.cluster import RedisCluster, ClusterNode # ─────── Cluster connection ─────── startup_nodes = [ ClusterNode("redis_host_1", 6379), ClusterNode("redis_host_2", 6379), ClusterNode("redis_host_3", 6379) ] rc = RedisCluster(startup_nodes=startup_nodes,decode_responses=True,username='redisreadonly',password='mySuperSecretPassw...

Creating defaultsfile - an easy guide!

This post is for the automation fanatics and enthusiasts. Of course, the others aren't excluded! The defaultsfile option that can be used with adutilities is a handy option to save time during patching or other maintenance activities.

Though the defaultsfile gets a mention by almost everyone in the context of reducing downtime, the method of creating it is not, unfortunately. In this post, I'd like to share this using an example - compiling apps schema using adadmin.
Note: The full explanation of creating a defaultsfile is mentioned in Chapter 2 (Maintaining Your System) of the Oracle Applications Maintenance Procedures.
1. Run adadmin command as below:

adadmin defaultsfile=$APPL_TOP/admin/$TWO_TASK/<DEFAULTS_FILE_NAME>


e.g.:

adadmin defaultsfile=$APPL_TOP/admin/$TWO_TASK/adadmin_cmpl_apps_schema.txt


The above command searches for a file with name adadmin_cmpl_apps_schema.txt in $APPL_TOP/admin/$TWO_TASK directory. If it exists, it uses the values provided in that file. Else, it creates a new file and the contents of the new file would be the answers that one provides at the subsequent prompts of adadmin.

Note: Not mentioning the correct path would error out as below. So, always ensure that you mention the full path to the default file.

$ adadmin defaultsfile=adadmin_maint_on.txt

Copyright (c) 2002 Oracle Corporation
Redwood Shores, California, USA
Oracle Applications AD Administration
Version 11.5.0

NOTE: You may not use this utility for custom development unless you have written permission from Oracle Corporation.

You have not specified the correct path for defaults file.

The expected location of the defaults file is
$APPL_TOP/admin/$TWO_TASK
and you must provide full access path to the file.

2. Assuming that the defaultsfile does not exist, proceed as you normally would for compiling apps schema.

3. Once the compilation is complete, exit out of adadmin and look for the file $APPL_TOP/admin/$TWO_TASK/adadmin_cmpl_apps_schema.txt.

4. VoilĂ ! You are done! You have the defaultsfile (including passwords) for compiling apps schema. Whenever you want to compile apps schema using adadmin NON-INTERACTIVELY, run the below command:

$ adadmin defaultsfile=$APPL_TOP/admin/$TWO_TASK/adadmin_cmpl_apps_schema.txt


Comments

Popular posts from this blog

Interesting Oracle Applications (EBS) Interview Questions

Modify retention period of workflow queues

Check if UTL_FILE and FND_FILE are working fine