psadmin_plus
is a RubyGem helper tool for psadmin
. By passing parameters via command line, you can run psadmin
actions like start, stop, status, etc. All domains should be contained in a single PS_CFG_HOME
. If you use multiple PS_CFG_HOME
homes, see the Multi Config Homes section on how to enable support.
Task | Command |
---|---|
help | psa help |
list domains | psa list |
start all domains | psa start |
start all web domains | psa start web |
start hdev web domain | psa start web hdev |
clear hrdev cache and restart | psa bounce app hrdev |
check status with PS_CFG_HOME override | psa status all all PS_CFG_HOME=/opt/psft/cfg |
gem install psadmin_plus
Hey, I don't have ruby installed!
psadm2
using the --user-install
command.
$ /opt/puppetlabs/puppet/bin/gem install psadmin_plus --user-install
$ echo 'export PATH=$PATH:~/.gem/ruby/2.4.0/bin' >> ~/.bashrc
$ . ~/.bashrc
If you don't want to use the gem
install, do a git
clone install of this repo instead. Then add psadmin-plus/bin
to your PATH
. This can be helpful when doing development or adjusting psadmin-plus
to better fit your needs.
cd ~
git clone https://github.com/psadmin-io/psadmin-plus.git
cd psadmin-plus
export PATH=$PATH:~/psadmin-plus/bin
psa help
Environment variables are used to control psadmin-plus
and psadmin
functionality. You can set environment variables in your shell before calling psadmin-plus
. You can also set variables in your .psa.conf
file. Lastly, you can pass in key value pairs in the trailing arguments you send to psadmin-plus
and they will be exported. To pass variables in your arguments, they need to be listed last and you need to provide command, type and domain arguments as well. Example: psa status all all PS_CFG_HOME=/opt/psft/cfg OTHER=value
.
PS_RUNTIME_USER
PS_CFG_HOME
and should run psadmin
psadm2
PS_PSA_SUDO
PS_RUNTIME_USER
via sudo
, if set to on
on
, off
off
PS_MULTI_HOME
PS_CFG_HOME
are stored. PS_MULTI_HOME=/opt/oracle/psft/cfg
or PS_MULTI_HOME=c:/psft/cfg
false
false
PS_MULTI_PREFIX
PS_MULTI_PREFIX
is set to 5, then the PS_CFG_HOME must end with the first 5 characters of domain name. (E.g, c:\psft\cfg\HRDEV)0
and will assume single domainPS_MULTI_DELIMIT
PS_CFG_HOME
directories are structured. /
is used for when a pattern of <PS_MULTI_HOMES>/<DOMAIN_NAME>
is used.
# c:/ps_cfg_home/hrdev
# c:/ps_cfg_home/hrtst
PS_MULTI_HOMES="c:/ps_cfg_home"
PS_MULTI_DELIMIT="/"
<PS_MULTI_HOMES>
and <DOMAIN_NAME>
.
# c:/ps_cfg_home-hrdev
# c:/ps_cfg_home-hrtst
PS_MULTI_HOMES="c:/ps_cfg_home"
PS_MULTI_DELIMIT="-"
/
PS_WIN_SERVICES
all
, tux
, web
, app
, prcs
false
. psadmin
is used to start/stop domains.Psft<Type><Domain>Service
WEB_SERVICE_NAME
APP_SERVICE_NAME
PRCS_SERVICE_NAME
#{domain}
somewhere in the name. That is used by psadmin-plus
to call the correct domain. E.g, WEB_SERVICE_NAME="#{domain}-pia"
PS_TRAIL_SERVICE
true
, false
false
PS_PSA_CONF
psadmin-plus
~/.psa.conf
PS_HOOK_INTERP
ruby
, bash
, Powershell -File
, etcruby
PS_HOOK_PRE
and PS_HOOK_POST
lib/hooks
.false
and no hook is triggered.PS_HOOK_STOP
and PS_HOOK_START
stop
command and after the start
command.lib/hooks
.false
and no hook is triggered.You can store the psadmin-plus
configuration in a file instead of environment variables.
~/.psa.conf
envVar=value
pairs on each line PS_POOL_MGMT=on
PS_MULTI_HOMES=/opt/oracle/psft/cfg
PS_HEALTH_FILE=host.html
Here are some suggested additions to your bash profile.
export PS_RUNTIME_USER="<ps-cfg-home-owner>"
export PS_POOL_MGMT="off"
export PS_PSA_SUDO="on"
Or set PS_PSA_CONF
if you want to use a configuration file in a custom location
export PS_PSA_CONF=/u01/app/psa.conf
web
, app
, pubsub
, and prcs
domain types.psa status app,prcs hrdev,hrtst
psa configure web
psa
can run commands as a service account so domains are started under the correct account.psadmin
for domains on WindowsPS_CFG_HOME
s: The multi-config home support is limited to a single domain under PS_CFG_HOME
, and the domain name must match the folder for PS_CFG_HOME
. If your domain is named HRDEV
, then the PS_CFG_HOME
must end with that domain name. (E.g, c:\psft\cfg\HRDEV
)Hooks give you the ability to execute custom scripts in the psadmin-plus
execution stream. Hook behavior is controlled by PS_HOOKS_*
variables, see Environment Variables. You can select what type of scripts will be executed - examples: ruby, bash, powershell. You have the option to run scripts pre or post commands, as well as when using start
or stop
.
SSL_CERT_FILE
variable
export SSL_CERT_FILE=/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem