From 2ddefa08c977cf81fd3b20d9851f0a9211c9e40e Mon Sep 17 00:00:00 2001 From: William Welling <8352733+wwelling@users.noreply.github.com> Date: Wed, 10 Aug 2022 08:33:53 -0500 Subject: [PATCH 01/13] Standardize the multiple forms of gitignore --- .gitignore | 40 ++++++++++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index fae313f..2bf65cc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,34 @@ -.apt_generated/ +# Java project type gitignore + +# Compiled class file +*.class + +# Log file +*.log + +# BlueJ files +*.ctxt + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.nar +*.ear +*.zip +*.tar.gz +*.rar + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* +replay_pid* + +# Docker gitignore + +# Application specific gitignore +# Maven target/ -.DS_Store -.classpath -.factorypath -.project -.settings -.springBeans -bin/ + logs/ From 1e19267b1afe283362480cf221771d55f23fa058 Mon Sep 17 00:00:00 2001 From: William Welling <8352733+wwelling@users.noreply.github.com> Date: Wed, 10 Aug 2022 16:10:29 -0500 Subject: [PATCH 02/13] add contributing, add deploying, update license and readme --- CONTRIBUTING.md | 63 +++++++++++++++++++++++++++++++++++++++++++++++++ DEPLOYING.md | 53 +++++++++++++++++++++++++++++++++++++++++ LICENSE | 7 +++--- README.md | 44 +++++++++++++++++++++++++++++++--- 4 files changed, 161 insertions(+), 6 deletions(-) create mode 100644 CONTRIBUTING.md create mode 100644 DEPLOYING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..14e15dd --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,63 @@ + +# Contributing To LibraryServiceStatusSystemService + +Though LibraryServiceStatusSystemService is developed and maintained by Texas A&M University Libraries, we welcome community contributions. +Involvement in LibraryServiceStatusSystemService can take many forms: + +
(back to top)
+ +## Using + +Deploying LibraryServiceStatusSystemService and trying it out at your own institution is itself a way of contributing to the development process. +For more information on deployment strategies please see the [Deployment Guide][deployment-guide]. + +[deployment-guide]: DEPLOYING.md + +
(back to top)
+ +## Filing Issues + +Once you are using LibraryServiceStatusSystemService the creation of new issues through GitHub is a major method of contribution towards LibraryServiceStatusSystemService development. +Issues can be motivated by the discovery of a bug in the software, or by the desire to see either new features added or see changes to existing features. + +There are two primary types of issues: +1. Bug Report +2. Feature Request + +A **Bug Report** involves a problem with the existing software or a **Feature** is not working as designed or expected. + +A **Feature** involves new functionality or behavior. + +
(back to top)
+ +## Creating a Pull Request + +Community code and documentation contributions are welcome and should take the form of a **GitHub Pull Request** (*PR*). +Each *PR* will need to be reviewed by a LibraryServiceStatusSystemService developer. +A review will result in the *PR* being accepted and merged, a descriptive request for changes, or the *PR* being closed along with a detailed explanation. + +It is our intention to maintain labeling on issues that are deemed to be low difficulty in order to provide a good point of entry for those looking to begin contributing code or documentation. + +A *PR* description should include a list of the specific issues resolved, the predicted *semantic versioning* impact of the changes, and a description which characterizes the nature of the changes made. +When creating a *PR*, an issue template is automatically provided to simplify this process. + +For more information about *semantic versioning* please see [Semantic Versioning Website][semantic-versioning]. +In general keep in mind: + +- A **Major Change** is a breaking change that is not backwards compatible. +- A **Minor Change** is a non-breaking change that is backwards compatible to the last **Major Change**. +- A **Patch** is a trivial change or bug fix that should not impact compatibility. + +
(back to top)
+ +## Good Luck! + +We look forward to seeing your contributions. +If you have any additional questions please contact the LibraryServiceStatusSystemService developers at [helpdesk@library.tamu.edu][helpdesk-email]. + +
(back to top)
+ + +[deployment-guide]: DEPLOYING.md +[semantic-versioning]: https://semver.org/ +[helpdesk-email]: mailto:helpdesk@library.tamu.edu \ No newline at end of file diff --git a/DEPLOYING.md b/DEPLOYING.md new file mode 100644 index 0000000..5cd6443 --- /dev/null +++ b/DEPLOYING.md @@ -0,0 +1,53 @@ + +# Deployment Guide + +## Production Deployments + +For **production** deployments, deploy using `docker-compose` via the [MyLibrary App][app-repo]. +This is the recommended method of deployment for production systems. +Go to the [MyLibrary App][app-repo] and following the deployment instructions there. + +Performing the deployment using the [MyLibrary App][app-repo] should be something similar to the following: +```shell +docker-compose up +``` + +The **development** deployment can also use `docker-compose` in the same way. + +
(back to top)
+ + +## Development Deployment using **Docker** + +To manually use `docker` rather than `docker-compose`, run the following: + +```shell +docker image build -t service . +docker run -it service +``` + +``` +docker build --help +# -t, --tag list Name and optionally a tag in the +``` + +``` +docker run --help +# -i, --interactive Keep STDIN open even if not attached. +# -t, --tty Allocate a pseudo-TTY +``` + +
(back to top)
+ +## Development Deployment using **Maven** + +Running locally is easiest using spring boot: + +```shell +mvn spring-boot:run +``` + +
(back to top)
+ + +[app-repo]: https://github.com/TAMULib/MyLibrary \ No newline at end of file diff --git a/LICENSE b/LICENSE index c26318f..9d02011 100644 --- a/LICENSE +++ b/LICENSE @@ -1,7 +1,8 @@ -Copyright (c) 2016 Texas A&M University Libraries +The MIT License (MIT) +Copyright © 2022 Texas A&M University Libraries -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md index d2c0f15..f4fb686 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,44 @@ -[![Build Status](https://github.com/TAMULib/LibraryServiceStatusSystemService/workflows/Build/badge.svg)](https://github.com/TAMULib/LibraryServiceStatusSystemService/actions?query=workflow%3ABuild) -[![Coverage Status](https://coveralls.io/repos/github/TAMULib/LibraryServiceStatusSystemService/badge.svg)](https://coveralls.io/github/TAMULib/LibraryServiceStatusSystemService) +[![Build Status][build-badge]][build-status] +[![Coverage Status][coverage-badge]][coverage-status] # Library Service Status System -A Spring Boot service that allows management and notification of Library System Status. +A service for managing Library System Status developed and maintained by [Texas A&M University Libraries][tamu-library]. + +
+Table of contents + + - [Developer Documentation](#developer-documentation) + - [Additional Resources](#additional-resources) + +
+ +## Developer Documentation + +- [Contributors Documentation][contribute-guide] +- [Deployment Documentation][deployment-guide] +- [API Documentation][api-documentation] + +
(back to top)
+ +## Additional Resources + +Please feel free to file any issues concerning Auth Service to the issues section of the repository. + +Any questions concerning Auth Service can be directed to helpdesk@library.tamu.edu. + +
(back to top)
+ +Copyright © 2022 Texas A&M University Libraries under the [The MIT License][license]. + + +[build-badge]: https://github.com/TAMULib/LibraryServiceStatusSystemService/workflows/Build/badge.svg +[build-status]: https://github.com/TAMULib/LibraryServiceStatusSystemService/actions?query=workflow%3ABuild +[coverage-badge]: https://coveralls.io/repos/github/TAMULib/LibraryServiceStatusSystemService/badge.svg +[coverage-status]: https://coveralls.io/github/TAMULib/LibraryServiceStatusSystemService + +[api-documentation]: https://tamulib.github.io/LibraryServiceStatusSystemService +[tamu-library]: http://library.tamu.edu +[deployment-guide]: DEPLOYING.md +[contribute-guide]: CONTRIBUTING.md +[license]: LICENSE From 172bfc7b3213d2efd176ca5a64594c0b644438dd Mon Sep 17 00:00:00 2001 From: William Welling <8352733+wwelling@users.noreply.github.com> Date: Wed, 10 Aug 2022 16:46:22 -0500 Subject: [PATCH 03/13] upgrade weaver --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9768e37..2bcf384 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ edu.tamu.weaver webservice-parent - 2.1.1-RC10 + 2.1.1-RC11 From 993332d05ef01ce93acad5ff7bc3caf539124735 Mon Sep 17 00:00:00 2001 From: William Welling <8352733+wwelling@users.noreply.github.com> Date: Thu, 11 Aug 2022 10:48:23 -0500 Subject: [PATCH 04/13] update dockerfile --- Dockerfile | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/Dockerfile b/Dockerfile index b217214..7fe5fd9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,21 +1,17 @@ # Settings. ARG USER_ID=3001 ARG USER_NAME=lsss -ARG HOME_DIR=/$USER_NAME -ARG SOURCE_DIR=$HOME_DIR/source +ARG SOURCE_DIR=/$USER_NAME/source # Maven stage. FROM maven:3-openjdk-11-slim as maven ARG USER_ID ARG USER_NAME -ARG HOME_DIR ARG SOURCE_DIR -# Create the group (use a high ID to attempt to avoid conflits). -RUN groupadd -g $USER_ID $USER_NAME - -# Create the user (use a high ID to attempt to avoid conflits). -RUN useradd -d $HOME_DIR -m -u $USER_ID -g $USER_ID $USER_NAME +# Create the user and group (use a high ID to attempt to avoid conflicts). +RUN groupadd --non-unique -g $USER_ID $USER_NAME && \ + useradd --non-unique -d /$USER_NAME -m -u $USER_ID -g $USER_ID $USER_NAME # Update the system. RUN apt-get update && apt-get upgrade -y @@ -40,23 +36,20 @@ RUN mvn package -Pjar -DskipTests=true FROM openjdk:11-jre-slim ARG USER_ID ARG USER_NAME -ARG HOME_DIR ARG SOURCE_DIR -# Create the group (use a high ID to attempt to avoid conflits). -RUN groupadd -g $USER_ID $USER_NAME - -# Create the user (use a high ID to attempt to avoid conflits). -RUN useradd -d $HOME_DIR -m -u $USER_ID -g $USER_ID $USER_NAME +# Create the user and group (use a high ID to attempt to avoid conflicts). +RUN groupadd --non-unique -g $USER_ID $USER_NAME && \ + useradd --non-unique -d /$USER_NAME -m -u $USER_ID -g $USER_ID $USER_NAME # Login as user. USER $USER_NAME # Set deployment directory. -WORKDIR $HOME_DIR +WORKDIR /$USER_NAME # Copy over the built artifact from the maven image. -COPY --from=maven $SOURCE_DIR/target/ROOT.jar ./lsss.jar +COPY --from=maven /$USER_NAME/target/ROOT.jar ./lsss.jar # Run java command. From 6a1eeab999b0bc8d2e618f6933d06ac03b7180c9 Mon Sep 17 00:00:00 2001 From: William Welling <8352733+wwelling@users.noreply.github.com> Date: Thu, 11 Aug 2022 11:02:40 -0500 Subject: [PATCH 05/13] cleanup log files --- src/main/resources/log4j.properties | 17 ----------------- src/test/resources/log4j.properties | 17 ----------------- 2 files changed, 34 deletions(-) delete mode 100644 src/main/resources/log4j.properties delete mode 100644 src/test/resources/log4j.properties diff --git a/src/main/resources/log4j.properties b/src/main/resources/log4j.properties deleted file mode 100644 index e8f3be4..0000000 --- a/src/main/resources/log4j.properties +++ /dev/null @@ -1,17 +0,0 @@ -# Root logger option -log4j.rootLogger=DEBUG, stdout, file - -# Redirect log messages to console -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.Target=logger.info -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n - -# Redirect log messages to a log file -log4j.appender.file=org.apache.log4j.RollingFileAppender -#outputs to Tomcat home -log4j.appender.file.File=${catalina.home}/logs/myapp.log -log4j.appender.file.MaxFileSize=5MB -log4j.appender.file.MaxBackupIndex=10 -log4j.appender.file.layout=org.apache.log4j.PatternLayout -log4j.appender.file.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n \ No newline at end of file diff --git a/src/test/resources/log4j.properties b/src/test/resources/log4j.properties deleted file mode 100644 index e8f3be4..0000000 --- a/src/test/resources/log4j.properties +++ /dev/null @@ -1,17 +0,0 @@ -# Root logger option -log4j.rootLogger=DEBUG, stdout, file - -# Redirect log messages to console -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.Target=logger.info -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n - -# Redirect log messages to a log file -log4j.appender.file=org.apache.log4j.RollingFileAppender -#outputs to Tomcat home -log4j.appender.file.File=${catalina.home}/logs/myapp.log -log4j.appender.file.MaxFileSize=5MB -log4j.appender.file.MaxBackupIndex=10 -log4j.appender.file.layout=org.apache.log4j.PatternLayout -log4j.appender.file.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n \ No newline at end of file From afeebedd82d995138e3bcc34ef379d9bcc14a7bd Mon Sep 17 00:00:00 2001 From: William Welling <8352733+wwelling@users.noreply.github.com> Date: Thu, 11 Aug 2022 11:13:14 -0500 Subject: [PATCH 06/13] normalize pom --- pom.xml | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/pom.xml b/pom.xml index 2bcf384..4222b58 100644 --- a/pom.xml +++ b/pom.xml @@ -1,11 +1,14 @@ - - 4.0.0 + edu.tamu status-system 1.4.4 + Library-Service-Status-System + A System for monitoring and reporting the status of Library Services @@ -105,7 +108,7 @@ - + ROOT @@ -207,14 +210,22 @@ tamu-releases https://artifacts.library.tamu.edu/repository/maven-releases - true - false + + true + + + false + tamu-snapshots https://artifacts.library.tamu.edu/repository/maven-snapshots - false - true + + false + + + true + From 2197bf45c535b91898382cbf30c36ffe67a5800e Mon Sep 17 00:00:00 2001 From: William Welling <8352733+wwelling@users.noreply.github.com> Date: Thu, 11 Aug 2022 11:13:27 -0500 Subject: [PATCH 07/13] add deployment section and correct readme --- README.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f4fb686..76f6b00 100644 --- a/README.md +++ b/README.md @@ -8,11 +8,21 @@ A service for managing Library System Status developed and maintained by [Texas
Table of contents + - [Deployment](#deployment) - [Developer Documentation](#developer-documentation) - [Additional Resources](#additional-resources)
+## Deployment + +For a quick and easy deployment using `docker-compose` consider using the [Library Service Status System App Repo][app-repo]. + +For _advanced use cases_, or when `docker-compose` is unavailable, the UI may be either started using `docker` directly or even manually started. +This process is further described in the [Deployment Guide][deployment-guide]. + + + ## Developer Documentation - [Contributors Documentation][contribute-guide] @@ -23,15 +33,16 @@ A service for managing Library System Status developed and maintained by [Texas ## Additional Resources -Please feel free to file any issues concerning Auth Service to the issues section of the repository. +Please feel free to file any issues concerning Library Service Status System Service to the issues section of the repository. -Any questions concerning Auth Service can be directed to helpdesk@library.tamu.edu. +Any questions concerning Library Service Status System Service can be directed to helpdesk@library.tamu.edu. Copyright © 2022 Texas A&M University Libraries under the [The MIT License][license]. +[app-repo]: https://github.com/TAMULib/LibraryServiceStatusSystem [build-badge]: https://github.com/TAMULib/LibraryServiceStatusSystemService/workflows/Build/badge.svg [build-status]: https://github.com/TAMULib/LibraryServiceStatusSystemService/actions?query=workflow%3ABuild [coverage-badge]: https://coveralls.io/repos/github/TAMULib/LibraryServiceStatusSystemService/badge.svg From a8640221fda7cda8b61de1e9348baec894e729cd Mon Sep 17 00:00:00 2001 From: William Welling <8352733+wwelling@users.noreply.github.com> Date: Thu, 11 Aug 2022 11:23:45 -0500 Subject: [PATCH 08/13] update build workflow --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1dac532..dafaf03 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,10 +7,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: "Maven Cache" - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.m2/repository key: ${{ runner.os }}-cache-maven-${{ hashFiles('**/pom.xml') }} From 8b9199b2d2817dda2269a300f85f21d788942172 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Thu, 18 Aug 2022 16:17:50 -0500 Subject: [PATCH 09/13] Use .gitignore based off of App Repos. --- .gitignore | 84 ++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 60 insertions(+), 24 deletions(-) diff --git a/.gitignore b/.gitignore index 2bf65cc..4faeb8c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,34 +1,70 @@ -# Java project type gitignore +### Git ### +!.gitkeep -# Compiled class file -*.class -# Log file -*.log +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache -# BlueJ files -*.ctxt -# Mobile Tools for Java (J2ME) -.mtj.tmp/ +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr -# Package Files # -*.jar -*.war -*.nar -*.ear -*.zip -*.tar.gz -*.rar -# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml -hs_err_pid* -replay_pid* +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ -# Docker gitignore +/.nb-gradle/ + + +### VS Code ### +.vscode/ + +dump.rdb -# Application specific gitignore -# Maven -target/ +### OS Specific ### +.DS_Store +.tmp/ + +tmp/ + + +### Maven ### logs/ +target/ + +.classpth +.mvn/timing.properties +.mvn/wrapper/maven-wrapper.jar +.project + +buildNumber.properties +dependency-reduced-pom.xml +pom.xml.next +pom.xml.tag +pom.xml.releaseBackup +pom.xml.versionsBackup +release.properties + + +### Weaver ### +dist/ + + +### Project Specific ### +.env* + +!**/src/main/** +!**/src/test/** From 41ae7c5847f8846b80f9bd6663ab2df53447e860 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Thu, 18 Aug 2022 16:40:08 -0500 Subject: [PATCH 10/13] Update readme and related files for consistency. - Fix simple mistakes. - Use long/full names in titles without acronyms. - Leave most of the README.md design as-is for comparison against alternative methods. - Fix license sentence. - Fix line endings where needed. - Use different documentation for cases where there is no `docker-compose` available (as in, no UI or App Repos). - Some documents have the incorrect link styling, which doesn't work. - Make readme and related files more consistent. --- CONTRIBUTING.md | 22 +++++---- DEPLOYING.md | 120 +++++++++++++++++++++++++++--------------------- README.md | 10 +++- 3 files changed, 87 insertions(+), 65 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 14e15dd..9bfd1d9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,23 +1,23 @@ -# Contributing To LibraryServiceStatusSystemService +# Contributing to Library Service Status System UI -Though LibraryServiceStatusSystemService is developed and maintained by Texas A&M University Libraries, we welcome community contributions. -Involvement in LibraryServiceStatusSystemService can take many forms: +Though *Library Service Status System UI* is developed and maintained by Texas A&M University Libraries, we welcome community contributions. +Involvement in *Library Service Status System UI* can take many forms. + ## Using -Deploying LibraryServiceStatusSystemService and trying it out at your own institution is itself a way of contributing to the development process. +Deploying *Library Service Status System UI* and trying it out at your own institution is itself a way of contributing to the development process. For more information on deployment strategies please see the [Deployment Guide][deployment-guide]. -[deployment-guide]: DEPLOYING.md - + ## Filing Issues -Once you are using LibraryServiceStatusSystemService the creation of new issues through GitHub is a major method of contribution towards LibraryServiceStatusSystemService development. +Once you are using *Library Service Status System UI* the creation of new issues through GitHub is a major method of contribution towards *Library Service Status System UI* development. Issues can be motivated by the discovery of a bug in the software, or by the desire to see either new features added or see changes to existing features. There are two primary types of issues: @@ -30,10 +30,11 @@ A **Feature** involves new functionality or behavior. + ## Creating a Pull Request Community code and documentation contributions are welcome and should take the form of a **GitHub Pull Request** (*PR*). -Each *PR* will need to be reviewed by a LibraryServiceStatusSystemService developer. +Each *PR* will need to be reviewed by a *Library Service Status System UI* developer. A review will result in the *PR* being accepted and merged, a descriptive request for changes, or the *PR* being closed along with a detailed explanation. It is our intention to maintain labeling on issues that are deemed to be low difficulty in order to provide a good point of entry for those looking to begin contributing code or documentation. @@ -50,14 +51,15 @@ In general keep in mind: + ## Good Luck! We look forward to seeing your contributions. -If you have any additional questions please contact the LibraryServiceStatusSystemService developers at [helpdesk@library.tamu.edu][helpdesk-email]. +If you have any additional questions please contact the *Library Service Status System UI* developers at helpdesk@library.tamu.edu. + [deployment-guide]: DEPLOYING.md [semantic-versioning]: https://semver.org/ -[helpdesk-email]: mailto:helpdesk@library.tamu.edu \ No newline at end of file diff --git a/DEPLOYING.md b/DEPLOYING.md index 5cd6443..3e46876 100644 --- a/DEPLOYING.md +++ b/DEPLOYING.md @@ -1,53 +1,67 @@ - -# Deployment Guide - -## Production Deployments - -For **production** deployments, deploy using `docker-compose` via the [MyLibrary App][app-repo]. -This is the recommended method of deployment for production systems. -Go to the [MyLibrary App][app-repo] and following the deployment instructions there. - -Performing the deployment using the [MyLibrary App][app-repo] should be something similar to the following: -```shell -docker-compose up -``` - -The **development** deployment can also use `docker-compose` in the same way. - - - - -## Development Deployment using **Docker** - -To manually use `docker` rather than `docker-compose`, run the following: - -```shell -docker image build -t service . -docker run -it service -``` - -``` -docker build --help -# -t, --tag list Name and optionally a tag in the -``` - -``` -docker run --help -# -i, --interactive Keep STDIN open even if not attached. -# -t, --tty Allocate a pseudo-TTY -``` - - - -## Development Deployment using **Maven** - -Running locally is easiest using spring boot: - -```shell -mvn spring-boot:run -``` - - - - -[app-repo]: https://github.com/TAMULib/MyLibrary \ No newline at end of file + +# Library Service Status System Service Deployment Guide + +## Production Deployments + +For **production** deployments, deploy using `docker-compose` via the [LSSS App Repo][app-repo]. +This is the recommended method of deployment for production systems. +Go to the [LSSS App Repo][app-repo] and following the deployment instructions there. + +Performing the deployment using the [LSSS App Repo][app-repo] should be something similar to the following: +```shell +docker-compose up +``` + +The **development** deployment can also use `docker-compose` in the same way. + + + + +## Development Deployment using Docker + +To manually use `docker` rather than `docker-compose`, run the following: + +```shell +docker image build -t project . +docker run -it project +``` + +_* Note: `-t project` and `-it project` may be changed to another tag name as desired, such as `-t developing_on_this` and `-it developing_on_this`._
+ + + + +## Development Deployment using Maven + +Manual deployment can be summed up by running: + +```shell +mvn spring-boot:run +``` + +Those steps are a great way to start but they also fail to explain the customization that is often needed. +There are multiple ways to further configure this for deployment to better meet the desired requirements. + +It is highly recommended only to perform *manual installation* when developing. +For **production** deployment, please use `docker-compose` via the [LSSS App Repo][app-repo] or use the **Docker** method above. + + + + +### Directly Configuring the `src/main/resources/application.yml` File + +This method of configuration works by altering the configuration file. + +With this in mind, the deployment steps now look like: + +```shell +# Edit 'src/main/resources/application.yml' here. + +mvn spring-boot:run +``` + + + + + +[app-repo]: https://github.com/TAMULib/LibraryServiceStatusSystem diff --git a/README.md b/README.md index 76f6b00..67c9ff0 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,9 @@ # Library Service Status System -A service for managing Library System Status developed and maintained by [Texas A&M University Libraries][tamu-library]. +A *Spring* backend for the *Library Service Status System (LSSS) Service* developed and maintained by [Texas A&M University Libraries][tamu-library]. + +This is a service for managing *Library Services*.
Table of contents @@ -14,6 +16,7 @@ A service for managing Library System Status developed and maintained by [Texas
+ ## Deployment For a quick and easy deployment using `docker-compose` consider using the [Library Service Status System App Repo][app-repo]. @@ -23,6 +26,7 @@ This process is further described in the [Deployment Guide][deployment-guide]. + ## Developer Documentation - [Contributors Documentation][contribute-guide] @@ -31,15 +35,17 @@ This process is further described in the [Deployment Guide][deployment-guide]. + ## Additional Resources Please feel free to file any issues concerning Library Service Status System Service to the issues section of the repository. Any questions concerning Library Service Status System Service can be directed to helpdesk@library.tamu.edu. +Copyright © 2022 Texas A&M University Libraries under the [MIT License][license]. + -Copyright © 2022 Texas A&M University Libraries under the [The MIT License][license]. [app-repo]: https://github.com/TAMULib/LibraryServiceStatusSystem From 149ef5328734b9e39e3d97f91e6f06b38cd7dcb1 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Fri, 19 Aug 2022 09:12:45 -0500 Subject: [PATCH 11/13] Use project-specific name in docker deploy instructions. --- DEPLOYING.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DEPLOYING.md b/DEPLOYING.md index 3e46876..52db491 100644 --- a/DEPLOYING.md +++ b/DEPLOYING.md @@ -22,11 +22,11 @@ The **development** deployment can also use `docker-compose` in the same way. To manually use `docker` rather than `docker-compose`, run the following: ```shell -docker image build -t project . -docker run -it project +docker image build -t lsssservice . +docker run -it lsssservice ``` -_* Note: `-t project` and `-it project` may be changed to another tag name as desired, such as `-t developing_on_this` and `-it developing_on_this`._
+_* Note: `-t lsssservice` and `-it lsssservice` may be changed to another tag name as desired, such as `-t developing_on_this` and `-it developing_on_this`._
From 23d20b53244dfcac74abd8769b499283715e5460 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Fri, 19 Aug 2022 09:22:48 -0500 Subject: [PATCH 12/13] Make Dockerfile more consistent. - Remove SOURCE_DIR when not needed. - Always clean and clear apt cache to reduce docker disk usage. - Make sure the SOURCE_DIR exists when not copying it wholesale. - Remove any spurious new lines. --- Dockerfile | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7fe5fd9..381780c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,8 +13,15 @@ ARG SOURCE_DIR RUN groupadd --non-unique -g $USER_ID $USER_NAME && \ useradd --non-unique -d /$USER_NAME -m -u $USER_ID -g $USER_ID $USER_NAME -# Update the system. -RUN apt-get update && apt-get upgrade -y +# Update the system and install dependencies. +RUN apt-get update && \ + apt-get upgrade -y && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + +# Make sure source directory exists. +RUN mkdir -p $SOURCE_DIR && \ + chown -R $USER_ID:$USER_ID $SOURCE_DIR # Set deployment directory. WORKDIR $SOURCE_DIR @@ -49,8 +56,7 @@ USER $USER_NAME WORKDIR /$USER_NAME # Copy over the built artifact from the maven image. -COPY --from=maven /$USER_NAME/target/ROOT.jar ./lsss.jar - +COPY --from=maven $SOURCE_DIR/target/ROOT.jar ./lsss.jar # Run java command. CMD ["java", "-jar", "./lsss.jar"] From 389267e483dda405822ebda0b11f72905145ba6d Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Fri, 19 Aug 2022 09:38:13 -0500 Subject: [PATCH 13/13] This is a service repo not a UI repo. --- CONTRIBUTING.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9bfd1d9..0c9ea33 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,15 +1,15 @@ -# Contributing to Library Service Status System UI +# Contributing to Library Service Status System Service -Though *Library Service Status System UI* is developed and maintained by Texas A&M University Libraries, we welcome community contributions. -Involvement in *Library Service Status System UI* can take many forms. +Though *Library Service Status System Service* is developed and maintained by Texas A&M University Libraries, we welcome community contributions. +Involvement in *Library Service Status System Service* can take many forms. ## Using -Deploying *Library Service Status System UI* and trying it out at your own institution is itself a way of contributing to the development process. +Deploying *Library Service Status System Service* and trying it out at your own institution is itself a way of contributing to the development process. For more information on deployment strategies please see the [Deployment Guide][deployment-guide]. @@ -17,7 +17,7 @@ For more information on deployment strategies please see the [Deployment Guide][ ## Filing Issues -Once you are using *Library Service Status System UI* the creation of new issues through GitHub is a major method of contribution towards *Library Service Status System UI* development. +Once you are using *Library Service Status System Service* the creation of new issues through GitHub is a major method of contribution towards *Library Service Status System Service* development. Issues can be motivated by the discovery of a bug in the software, or by the desire to see either new features added or see changes to existing features. There are two primary types of issues: @@ -34,7 +34,7 @@ A **Feature** involves new functionality or behavior. ## Creating a Pull Request Community code and documentation contributions are welcome and should take the form of a **GitHub Pull Request** (*PR*). -Each *PR* will need to be reviewed by a *Library Service Status System UI* developer. +Each *PR* will need to be reviewed by a *Library Service Status System Service* developer. A review will result in the *PR* being accepted and merged, a descriptive request for changes, or the *PR* being closed along with a detailed explanation. It is our intention to maintain labeling on issues that are deemed to be low difficulty in order to provide a good point of entry for those looking to begin contributing code or documentation. @@ -55,7 +55,7 @@ In general keep in mind: ## Good Luck! We look forward to seeing your contributions. -If you have any additional questions please contact the *Library Service Status System UI* developers at helpdesk@library.tamu.edu. +If you have any additional questions please contact the *Library Service Status System Service* developers at helpdesk@library.tamu.edu.