Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dm-docs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hammonds
dm-docs
Commits
f9cf2c20
Commit
f9cf2c20
authored
9 years ago
by
sveseli
Browse files
Options
Downloads
Patches
Plain Diff
update web portal config to include system user addition
parent
49959191
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sbin/dm_configure_web_portal.sh
+20
-1
20 additions, 1 deletion
sbin/dm_configure_web_portal.sh
with
20 additions
and
1 deletion
sbin/dm_configure_web_portal.sh
+
20
−
1
View file @
f9cf2c20
...
@@ -37,7 +37,10 @@ else
...
@@ -37,7 +37,10 @@ else
echo
"Deployment config file
$deployConfigFile
not found, using defaults"
echo
"Deployment config file
$deployConfigFile
not found, using defaults"
fi
fi
DM_INSTALL_DIR
=
${
DM_INSTALL_DIR
:
=
$DM_ROOT_DIR
/..
}
DM_SYSTEM_PASSWORD_FILE
=
${
DM_INSTALL_DIR
}
/etc/
${
DM_SYSTEM_USER
}
.system.passwd
DM_HOST_ARCH
=
`
uname
|
tr
[
A-Z]
[
a-z]
`
-
`
uname
-m
`
DM_HOST_ARCH
=
`
uname
|
tr
[
A-Z]
[
a-z]
`
-
`
uname
-m
`
GLASSFISH_DIR
=
$DM_SUPPORT_DIR
/glassfish/
$DM_HOST_ARCH
GLASSFISH_DIR
=
$DM_SUPPORT_DIR
/glassfish/
$DM_HOST_ARCH
JAVA_HOME
=
$DM_SUPPORT_DIR
/java/
$DM_HOST_ARCH
JAVA_HOME
=
$DM_SUPPORT_DIR
/java/
$DM_HOST_ARCH
...
@@ -54,7 +57,7 @@ DM_DOMAIN=domain1
...
@@ -54,7 +57,7 @@ DM_DOMAIN=domain1
# copy db driver
# copy db driver
echo
"Copying db driver"
echo
"Copying db driver"
rsync
-ar
$DM_ROOT_DIR
/src/java/DmWebPortal/lib/postgresql
-9.3-1102
.jdbc41.jar
$GLASSFISH_DIR
/glassfish/domains/
${
DM_DOMAIN
}
/lib/ext
rsync
-ar
$DM_ROOT_DIR
/src/java/DmWebPortal/lib/postgresql
*
.jdbc41.jar
$GLASSFISH_DIR
/glassfish/domains/
${
DM_DOMAIN
}
/lib/ext
# Check password from file
# Check password from file
passwordFile
=
$DM_INSTALL_DIR
/etc/
$DM_DB_NAME
.db.passwd
passwordFile
=
$DM_INSTALL_DIR
/etc/
$DM_DB_NAME
.db.passwd
...
@@ -79,3 +82,19 @@ $ASADMIN_CMD create-jdbc-resource --connectionpoolid ${DM_DB_POOL} ${DM_DATA_SOU
...
@@ -79,3 +82,19 @@ $ASADMIN_CMD create-jdbc-resource --connectionpoolid ${DM_DB_POOL} ${DM_DATA_SOU
echo
"Testing connection"
echo
"Testing connection"
$ASADMIN_CMD
ping-connection-pool
$DM_DB_POOL
||
exit
1
$ASADMIN_CMD
ping-connection-pool
$DM_DB_POOL
||
exit
1
# Get system account password
if
[
!
-f
"
$DM_SYSTEM_PASSWORD_FILE
"
]
;
then
sttyOrig
=
`
stty
-g
`
stty
-echo
read
-p
"Enter system password for the
$DM_SYSTEM_USER
user: "
DM_SYSTEM_PASSWORD
echo
stty
$sttyOrig
echo
$DM_SYSTEM_PASSWORD
>
$DM_SYSTEM_PASSWORD_FILE
chmod
600
$DM_SYSTEM_PASSWORD_FILE
# Add dm system user to the DB
echo
"Adding
$DM_SYSTEM_USER
system user to the database"
dm-add-user
--username
=
$DM_SYSTEM_USER
--first-name
=
System
--last-name
=
Account
--password-file
=
$DM_SYSTEM_PASSWORD_FILE
||
exit
1
dm-add-user-system-role
--username
=
$DM_SYSTEM_USER
--role-name
=
Administrator
||
exit
1
fi
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment