Skip to content

Commit

Permalink
remove one-off cleanup dirs
Browse files Browse the repository at this point in the history
now that both are deployed with latest data center version, no longer need the *_cleanup dirs
also, for the same reason, both have local databases, no longer need DN_NAME_* in conf files or in scripts
  • Loading branch information
andylytical committed Sep 26, 2024
1 parent e7b3ead commit 7f2e4fd
Show file tree
Hide file tree
Showing 56 changed files with 30 additions and 12,048 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@ Atlassian tools and scripts for Confluence and Jira servers
# INSTALL
Install onto the production server.
```
APP=confluence #set to one of 'confluence' or 'jira'
export QS_GIT_REPO=https://github.com/ncsa/atlassian-tools.git
#export QS_GIT_BRANCH=branch_name #optional - specify a branch other than main
curl https://raw.githubusercontent.com/andylytical/quickstart/main/quickstart.sh | bash
mkdir -p ~/.config/atlassian-tools/
cp -n ~/atlassian-tools/conf/config.sh-${APP}-sample ~/.config/atlassian-tools/config.sh
ln -s ~/.config/atlassian-tools/config.sh ~/atlassian-tools/conf/
```

# Create a test instance on a clone of prod
Expand Down
19 changes: 0 additions & 19 deletions bin/fix_app_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,25 +43,6 @@ success "Fixed hostname in server.xml"
}


# Fix DB config
if [[ "$DB_NAME_OLD" == "$DB_NAME_NEW" ]] ; then
echo 'DB_NAME_OLD == DB_NAME_NEW, no changes needed ... skipping "Fix DB Config" step'
else
case "$APP_NAME" in
jira)
DB_CONF="$APP_HOME_DIR"/dbconfig.xml
PTRN="<url>jdbc:"
;;
confluence)
DB_CONF="$APP_HOME_DIR"/confluence.cfg.xml
PTRN='hibernate\.connection\.url'
;;
esac
sed "${sed_opts[@]}" -e "s/$DB_NAME_OLD/$DB_NAME_NEW/g" "$DB_CONF"
success "Updated DB config"
fi


# Fix session timeout in web.xml
# Historically, this was set to 12000 (8.3 days) ... why?
# See also:
Expand Down
20 changes: 0 additions & 20 deletions bin/go_validate_test_server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,23 +56,3 @@ XML="$APP_INSTALL_DIR"/conf/server.xml
grep -F 'proxyName=' "$XML" | grep -q "$HOSTNAME_NEW" \
|| die "New hostname not found in '$XML'"
success "server.xml has new hostname"

# fix_app_config.sh
# check db config ... only if old differs from new
if [[ "$DB_NAME_OLD" != "$DB_NAME_NEW" ]] ; then
case "$APP_NAME" in
jira)
DB_CONF="$APP_HOME_DIR"/dbconfig.xml
PTRN="<url>jdbc:"
;;
confluence)
DB_CONF="$APP_HOME_DIR"/confluence.cfg.xml
PTRN='hibernate\.connection\.url'
;;
esac
grep -F "/${DB_NAME_OLD}?" "$DB_CONF" \
&& die "Old DB name found in dbconfig.xml"
grep -F "/${DB_NAME_NEW}?" "$DB_CONF" \
|| die "New DB name NOT found in dbconfig.xml"
success "DB config looks good!"
fi
36 changes: 13 additions & 23 deletions conf/config.sh-confluence-sample
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,6 @@ APP_INSTALL_DIR=/srv/$APP_NAME/app
# arrays of service names
SYSTEM_SERVICES_TO_STOP=( puppet telegraf xcatpostinit1 $APP_NAME )
PUPPET_SERVICES_TO_STOP=( telegraf )

# Jira/Confluence DB names
# If no changes needed, set them the same
# (if both are the same, no updates will be attempted)
# TODO - can be removed once all databases are local
DB_NAME_OLD=
DB_NAME_NEW=$DB_NAME_OLD

#
#
### END OF USER CONFIGURABLE SECTION
Expand All @@ -53,21 +45,19 @@ BACKUP_DIR="${HOME}/backups/${APP_NAME}/${NOW}"


# validate_config
varnames=( \
IPADDR_OLD \
IPADDR_NEW \
HOSTNAME_OLD \
HOSTNAME_NEW \
APP_NAME \
APP_HOME_DIR \
APP_INSTALL_DIR \
DB_NAME_OLD \
DB_NAME_NEW \
SYSTEM_SERVICES_TO_STOP \
PUPPET_SERVICES_TO_STOP \
TS \
TODAY \
NOW \
varnames=(
IPADDR_OLD
IPADDR_NEW
HOSTNAME_OLD
HOSTNAME_NEW
APP_NAME
APP_HOME_DIR
APP_INSTALL_DIR
SYSTEM_SERVICES_TO_STOP
PUPPET_SERVICES_TO_STOP
TS
TODAY
NOW
)
for v in "${varnames[@]}"; do
if [[ -z "${!v}" ]] ; then
Expand Down
35 changes: 13 additions & 22 deletions conf/config.sh-jira-sample
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,6 @@ APP_NAME=jira
APP_HOME_DIR=/srv/${APP_NAME}/home
APP_INSTALL_DIR=/srv/${APP_NAME}/app

# Jira/Confluence DB names
# If no changes needed, set them the same
# (if both are the same, no updates will be attempted)
# TODO - can be removed once all databases are local
DB_NAME_OLD=jira5
DB_NAME_NEW=$DB_NAME_OLD
#DB_NAME_NEW=jira5test

# arrays of service names
# TODO - remove CRASHPLAN when no longer appropriate
Expand Down Expand Up @@ -58,21 +51,19 @@ BACKUP_DIR="${HOME}/backups/${APP_NAME}/${NOW}"


# validate_config
varnames=( \
IPADDR_OLD \
IPADDR_NEW \
HOSTNAME_OLD \
HOSTNAME_NEW \
APP_NAME \
APP_HOME_DIR \
APP_INSTALL_DIR \
DB_NAME_OLD \
DB_NAME_NEW \
SYSTEM_SERVICES_TO_STOP \
PUPPET_SERVICES_TO_STOP \
TS \
TODAY \
NOW \
varnames=(
IPADDR_OLD
IPADDR_NEW
HOSTNAME_OLD
HOSTNAME_NEW
APP_NAME
APP_HOME_DIR
APP_INSTALL_DIR
SYSTEM_SERVICES_TO_STOP
PUPPET_SERVICES_TO_STOP
TS
TODAY
NOW
)
for v in "${varnames[@]}"; do
if [[ -z "${!v}" ]] ; then
Expand Down
92 changes: 0 additions & 92 deletions jira_cleanup/IssueSecurity_MissingGroupsOrUsers.sql

This file was deleted.

21 changes: 0 additions & 21 deletions jira_cleanup/all_filters.sql

This file was deleted.

17 changes: 0 additions & 17 deletions jira_cleanup/attachment_migration_map.sql

This file was deleted.

Loading

0 comments on commit 7f2e4fd

Please sign in to comment.