Skip to content

Commit

Permalink
Merge feac7cb into 0283499
Browse files Browse the repository at this point in the history
  • Loading branch information
William Welling committed Aug 11, 2022
2 parents 0283499 + feac7cb commit cc765e5
Show file tree
Hide file tree
Showing 7 changed files with 219 additions and 48 deletions.
42 changes: 32 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +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
.vscode
bin/

logs/
*.log*
63 changes: 63 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<a name="readme-top"></a>
# Contributing To ProjectManagementService

Though ProjectManagementService is developed and maintained by Texas A&M University Libraries, we welcome community contributions.
Involvement in ProjectManagementService can take many forms:

<div align="right">(<a href="#readme-top">back to top</a>)</div>

## Using

Deploying ProjectManagementService 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

<div align="right">(<a href="#readme-top">back to top</a>)</div>

## Filing Issues

Once you are using ProjectManagementService the creation of new issues through GitHub is a major method of contribution towards ProjectManagementService 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.

<div align="right">(<a href="#readme-top">back to top</a>)</div>

## 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 ProjectManagementService 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.

<div align="right">(<a href="#readme-top">back to top</a>)</div>

## Good Luck!

We look forward to seeing your contributions.
If you have any additional questions please contact the ProjectManagementService developers at [helpdesk@library.tamu.edu][helpdesk-email].

<div align="right">(<a href="#readme-top">back to top</a>)</div>

<!-- LINKS -->
[deployment-guide]: DEPLOYING.md
[semantic-versioning]: https://semver.org/
[helpdesk-email]: mailto:helpdesk@library.tamu.edu
53 changes: 53 additions & 0 deletions DEPLOYING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<a name="readme-top"></a>
# 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.

<div align="right">(<a href="#readme-top">back to top</a>)</div>


## 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
```

<div align="right">(<a href="#readme-top">back to top</a>)</div>

## Development Deployment using **Maven**

Running locally is easiest using spring boot:

```shell
mvn spring-boot:run
```

<div align="right">(<a href="#readme-top">back to top</a>)</div>

<!-- LINKS -->
[app-repo]: https://github.com/TAMULib/MyLibrary
23 changes: 8 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
# Settings.
ARG USER_ID=3001
ARG USER_NAME=projectmanagement
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
Expand All @@ -40,20 +36,17 @@ 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 ./projectmanagement.jar
Expand Down
59 changes: 46 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,55 @@
[![Build Status](https://github.com/TAMULib/ProjectManagementService/workflows/Build/badge.svg)](https://github.com/TAMULib/ProjectManagementService/actions?query=workflow%3ABuild)
[![Coverage Status](https://coveralls.io/repos/github/TAMULib/ProjectManagementService/badge.svg)](https://coveralls.io/github/TAMULib/ProjectManagementService)
[![Build Status][build-badge]][build-status]
[![Coverage Status][coverage-badge]][coverage-status]

# Product Management Service
The Product Management Service is designed to connect our Library Webservice Status Application to our Version Management Software.

## Building Product Management Service
A service designed to connect our Library Service Status System to VersionOne and GitHub developed and maintained by [Texas A&M University Libraries][tamu-library].

### Development
```bash
$ mvn clean spring-boot:run
```
<details>
<summary>Table of contents</summary>

### Production
```bash
$ mvn clean package -DskipTests -Dproduction
```
- [Deployment](#deployment)
- [Developer Documentation](#developer-documentation)
- [Additional Resources](#additional-resources)

</details>

## Deployment

For a quick and easy deployment using `docker-compose` consider using the [Project Managment 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].

<div align="right">(<a href="#readme-top">back to top</a>)</div>

## Developer Documentation

- [API Documentation](https://tamulib.github.io/ProjectManagementService)
- [Contributors Documentation][contribute-guide]
- [Deployment Documentation][deployment-guide]
- [API Documentation][api-documentation]

<div align="right">(<a href="#readme-top">back to top</a>)</div>

## Additional Resources

Please feel free to file any issues concerning Project Management Service to the issues section of the repository.

Any questions concerning Project Management Service can be directed to helpdesk@library.tamu.edu.

<div align="right">(<a href="#readme-top">back to top</a>)</div>

Copyright © 2022 Texas A&M University Libraries under the [The MIT License][license].

<!-- LINKS -->
[app-repo]: https://github.com/TAMULib/ProjectManagement
[build-badge]: https://github.com/TAMULib/ProjectManagementService/workflows/Build/badge.svg
[build-status]: https://github.com/TAMULib/ProjectManagementService/actions?query=workflow%3ABuild
[coverage-badge]: https://coveralls.io/repos/github/TAMULib/ProjectManagementService/badge.svg
[coverage-status]: https://coveralls.io/github/TAMULib/ProjectManagementService

[api-documentation]: https://tamulib.github.io/ProjectManagementService
[tamu-library]: http://library.tamu.edu
[deployment-guide]: DEPLOYING.md
[contribute-guide]: CONTRIBUTING.md
[license]: LICENSE
24 changes: 17 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>

<groupId>edu.tamu</groupId>
<artifactId>product-management-service</artifactId>
<version>1.0.1</version>

<name>Product-Management-Service</name>

<description>A Webservice to manage Products</description>

<parent>
<groupId>edu.tamu.weaver</groupId>
<artifactId>webservice-parent</artifactId>
<version>2.1.1-RC10</version>
<version>2.1.1-RC11</version>
</parent>

<properties>
Expand Down Expand Up @@ -287,14 +289,22 @@
<repository>
<id>tamu-releases</id>
<url>https://artifacts.library.tamu.edu/repository/maven-releases</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>false</enabled></snapshots>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>tamu-snapshots</id>
<url>https://artifacts.library.tamu.edu/repository/maven-snapshots</url>
<releases><enabled>false</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>

Expand Down
3 changes: 0 additions & 3 deletions src/test/resources/logback-test.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<include resource="org/springframework/boot/logging/logback/base.xml"/>
<logger name="com.zaxxer" level="ERROR"/>
<logger name="org.hibernate" level="OFF"/>
<logger name="org.springframework" level="ERROR"/>
<logger name="org.tdl" level="ERROR"/>
<logger name="edu.tamu" level="ERROR"/>
<logger name="ro.isdc.wro" level="ERROR"/>
<property name="root.level.console" value="OFF"/>
</configuration>

0 comments on commit cc765e5

Please sign in to comment.