From 631ce0783ff10261d84e44e92422fb06d0e9bd6e Mon Sep 17 00:00:00 2001
From: Chris Hubing <chubing@internet2.edu>
Date: Wed, 4 Apr 2018 02:10:33 +0000
Subject: [PATCH] Cleanup

---
 BINSCRIPTS.md               | 41 --------------------------
 bin/ci-run.sh               |  6 ----
 bin/ci-stop.sh              |  8 -----
 files/bin/sendtierbeacon.sh | 25 ----------------
 files/bin/setenv.sh         |  5 ----
 files/bin/startup.sh        | 22 --------------
 tests/image.bats            | 59 -------------------------------------
 7 files changed, 166 deletions(-)
 delete mode 100644 BINSCRIPTS.md
 delete mode 100755 bin/ci-run.sh
 delete mode 100755 bin/ci-stop.sh
 delete mode 100644 files/bin/sendtierbeacon.sh
 delete mode 100644 files/bin/setenv.sh
 delete mode 100644 files/bin/startup.sh
 delete mode 100644 tests/image.bats

diff --git a/BINSCRIPTS.md b/BINSCRIPTS.md
deleted file mode 100644
index 7818108d..00000000
--- a/BINSCRIPTS.md
+++ /dev/null
@@ -1,41 +0,0 @@
-# util
-
-This repository is intended to be downloaded into a container repository during development for convenience purposes.  Since the major mechanisms of developing to the Docker container construction lifecycle are identical across container images, this repository allows for consistency and additional ease of use across all container images.
-
-## Install
-
-If you are reading this file in BINSCRIPTS.md, your container project is likely to be util-enabled.
-
-To use these scripts yourself, issue this command:
-
-```
-curl "https://github.internet2.edu/raw/docker/util/master/bin/install.sh?token=AAAAE4VRBLPB8VExPHSR5nCe791IAYqaks5Xzug5wA%3D%3D" | bash
-```
-
-### common.bash
-
-The installation process will create a common.bash file.  This file should be the central, canonical authority for management of environment variables.  While a subprocess may override them, the files in common.bash should be treated as authoritative defaults.  Processes (e.g. `docker build`, `bats`, inside `Jenkinsfile`) can read this file and process the results therein.
-
-You should edit this file to change the image name, and add any other helpful environment variables.
-
-### Jenkinsfile
-
-This will also install a Jenkinsfile to your repository, if it doesn't have one.  This will ensure that your Jenkins pipeline can leverage these scripts in the way intended.  Ensuring the commands that you issue on your laptop match the commands issued by the build pipeline is critical to ensure predictable, reliable results.
-
-## Use
-
-
-### Building
-
-#### build.sh
-`bin/build.sh `
-#### destroy.sh
-#### rebuild.sh
-
-### Running
-### rerun.sh
-### run.sh
-
-
-### Testing
-#### test.sh
diff --git a/bin/ci-run.sh b/bin/ci-run.sh
deleted file mode 100755
index 70761f08..00000000
--- a/bin/ci-run.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/bash
-
-# This file will run a container in the background
-source common.bash .
-
-docker run -d --name=$imagename -p 80:80 -p 443:443 $maintainer/$imagename
\ No newline at end of file
diff --git a/bin/ci-stop.sh b/bin/ci-stop.sh
deleted file mode 100755
index 54ab0196..00000000
--- a/bin/ci-stop.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/bash
-
-# This file will run a container in the background
-source common.bash .
-
-echo "Cleaning up Docker image($maintainer/$imagename)"
-docker stop $imagename >> /dev/null
-docker rm $imagename
diff --git a/files/bin/sendtierbeacon.sh b/files/bin/sendtierbeacon.sh
deleted file mode 100644
index f9ba5c45..00000000
--- a/files/bin/sendtierbeacon.sh
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/bash
-LOGHOST="collector.testbed.tier.internet2.edu"
-LOGPORT="5001"
-if [ -s /opt/tier/env.bash ]; then
-  . /opt/tier/env.bash
-fi
-
-#below for syslog, F-TICKS style
-#LOGTEXT="TIERBEACON/TIER/1.0#IM=$IMAGENAME#PV=$VERSION#TR=$TIERVERSION#MT=$MAINTAINER#"
-
-#below for JSON/REST style
-LOGTEXT="{ \"msgType\" : \"TIERBEACON\", \"msgName\" : \"TIER\", \"msgVersion\" : \"1.0\", \"tbProduct\" : \"$IMAGENAME\", \"tbProductVersion\" : \"$VERSION\", \"tbTIERRelease\" : \"$TIERVERSION\", \"tbMaintainer\" : \"$MAINTAINER\" }"
-
-
-if [ -z "$TIER_BEACON_OPT_OUT" ]; then
-  #send JSON
-  echo $LOGTEXT > msgjson.txt
-  curl -s -XPOST "${LOGHOST}:${LOGPORT}/" -H 'Content-Type: application/json' -T msgjson.txt 1>/dev/null
-  rm -f msgjson.txt
-  
-  #below is for syslog, F-TICKS style
-  #`logger -n $LOGHOST -P $LOGPORT -t TIERBEACON $LOGTEXT`
-
-  echo `date`"; TIER beacon sent."
-fi
diff --git a/files/bin/setenv.sh b/files/bin/setenv.sh
deleted file mode 100644
index a43bc0bd..00000000
--- a/files/bin/setenv.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/bash
-printenv | sed 's/^\(.*\)$/\1/g' | grep -E "^VERSION" > /opt/tier/env.bash
-printenv | sed 's/^\(.*\)$/\1/g' | grep -E "^TIERVERSION" >> /opt/tier/env.bash
-printenv | sed 's/^\(.*\)$/\1/g' | grep -E "^IMAGE" >> /opt/tier/env.bash
-printenv | sed 's/^\(.*\)$/\1/g' | grep -E "^MAINTAINER" >> /opt/tier/env.bash
diff --git a/files/bin/startup.sh b/files/bin/startup.sh
deleted file mode 100644
index c3bb95d5..00000000
--- a/files/bin/startup.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/bash
-CRONFILE=/opt/tier/tier-cron
-
-#set env vars for cron job
-/opt/tier/setenv.sh
-
-#build crontab file with random start time between midnight and 3:59am
-echo "#send daily beacon to TIER Central" > ${CRONFILE}
-echo $(expr $RANDOM % 59) $(expr $RANDOM % 3) "* * * /usr/bin/sendtierbeacon.sh >> /var/log/cron.log 2>&1" >> ${CRONFILE}
-chmod 644 ${CRONFILE}
-
-#install crontab
-crontab ${CRONFILE}
-
-#create cron logfile
-touch /var/log/cron.log
-
-#start crond
-/usr/sbin/crond
-
-#from intermediate container's CMD directive
-/opt/bin/start.sh
diff --git a/tests/image.bats b/tests/image.bats
deleted file mode 100644
index 8c6fd9d4..00000000
--- a/tests/image.bats
+++ /dev/null
@@ -1,59 +0,0 @@
-#!/usr/bin/env bats
-
-load ../common
-
-@test "MariaDB repo provisioned" {
-  docker run -i $maintainer/$imagename find /etc/yum.repos.d/MariaDB.repo
-}
-
-@test "Grouper directory created" {
-  docker run -i $maintainer/$imagename find /opt/grouper/$version/grouper.installer.properties
-}
-
-@test "Grouper installer properties in correct position" {
-  docker run -i $maintainer/$imagename find /etc/yum.repos.d/MariaDB.repo
-}
-
-@test "Grouper hibernate properties template available" {
-  docker run -i $maintainer/$imagename find /opt/etc/grouper.hibernate.properties
-}
-
-@test "Grouper whitelist properties template available" {
-  docker run -i $maintainer/$imagename find /opt/etc/grouper.properties
-}
-
-@test "API binary directory created" {
-  docker run -i $maintainer/$imagename find /opt/grouper/$version/grouper.apiBinary-$version
-}
-
-@test "Client binary directory created" {
-  docker run -i $maintainer/$imagename find /opt/grouper/$version/grouper.clientBinary-$version
-}
-
-@test "UI directory created" {
-  docker run -i $maintainer/$imagename find /opt/grouper/$version/grouper.ui-$version
-}
-
-@test "WS directory created" {
-  docker run -i $maintainer/$imagename find /opt/grouper/$version/grouper.ws-$version
-}
-
-@test "Tarball patch directory created" {
-  docker run -i $maintainer/$imagename find /opt/grouper/$version/tarballs/patches
-}
-
-
-# Skipping: Unknown how much reconstruction we miss this way. [jvf]
-
-@test "Database subjects not created" {
-  skip
-  docker run -i $maintainer/$imagename find /opt/grouper/$version/subjects.sql
-}
-
-@test "Database does not add quickstart data" {
-  skip
-  docker run -i $maintainer/$imagename find /opt/grouper/$version/grouper.apiBinary-$version/ddlScripts
-}
-
-
-