Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,20 @@
name: Bug Report
about: Report a bug encountered with ADLMFlexNetServer
labels:
- kind/bug
- kind/bug
---

**This is a Bug Report**

<!--Required Information-->
**Problem:**

**Problem:**

**Proposed Solution:**


**Steps to Reproduce:**


<!--Optional Information (remove the comment tags around information you would like to include)-->
<!--ADLMFlexNetServer Version:-->

<!--Additional Information:-->
<!--Additional Information:-->
6 changes: 4 additions & 2 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@
name: Feature Request
about: Suggest a feature or enhancement to the ADLMFlexNetServer project
labels:
- kind/feature
- kind/feature
---
**This is a Feature Request**

**This is a Feature Request**

**What would you like to be added**

<!-- Describe as precisely as possible how this feature/enhancement should work from the user perspective. What should be changed, etc. -->

**Why is this needed**

**Comments**

<!-- Any additional related comments that might help. Drawings/mockups would be extremely helpful (if required). -->
88 changes: 61 additions & 27 deletions .github/workflows/test-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,66 @@ name: Test and Release

# Run the workflow when a Pull Request is opened or when changes are pushed to main
on:
pull_request:
push:
branches: [ main ]
pull_request:
push:
branches: [main]

jobs:
test:
runs-on: ubuntu-latest
steps:
# Fetch the latest commit
- name: Checkout
uses: actions/checkout@v2

# Run tests
- name: Hadolint Action
uses: brpaz/hadolint-action@v1.1.0

release:
# Only release on push to main
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
# Waits for test jobs for each Node.js version to complete
needs: [test]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
test:
runs-on: ubuntu-latest
steps:
# Fetch the latest commit
- name: Checkout
uses: actions/checkout@v2

# Run tests
- name: Hadolint Action
uses: brpaz/hadolint-action@v1.1.0

release:
# Only release on push to main
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
# Waits for test jobs for each Node.js version to complete
needs: [test]
steps:
- name: Checkout
uses: actions/checkout@v2

# setup Docker buld action
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to Github Packages
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_PAT }}

- name: Build image and push to Docker Hub and GitHub Container Registry
uses: docker/build-push-action@v2
with:
# relative path to the place where source code with Dockerfile is located
context: ./
# Note: tags has to be all lower-case
tags: |
haysclark/adlmflexnetserver:latest
ghcr.io/haysclark/adlmflexnetserver:latest
# build on feature branches, push only on main branch
push: ${{ github.ref == 'refs/heads/main' }}

- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}

- name: Release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7 changes: 4 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This guide is intended for project contributors.

**Working on your first Pull Request?** You can learn how from this *free* series [How to Contribute to an Open Source Project on GitHub](https://kcd.im/pull-request)
**Working on your first Pull Request?** You can learn how from this _free_ series [How to Contribute to an Open Source Project on GitHub](https://kcd.im/pull-request)

## Code of Conduct

Expand All @@ -15,16 +15,17 @@ Please make sure you're familiar with and follow the [CODE_OF_CONDUCT.md](CODE_O
## Approving Pull Requests

1. Ensure there are no common Dockerfile pitfalls by _linting_ with [hadolint](https://github.com/hadolint/hadolint).

```bash
hadolint Dockerfile
```

1. Ensure the merge message conforms to [Conventional Commits](https://conventionalcommits.org/) spec.
1. Breaking changes? Ensure the commit message contains the text `BREAKING CHANGE:`.
1. Use "Squash and Merge". This keeps a clean history in `main`, with a full history available in Pull Requests.

## Releasing

1. A [GitHub Actions](https://github.com/features/actions) is triggered when any code is pushed to `main`. The action will `test` the build and all tests pass, it will then use [semantic-release](https://github.com/semantic-release/semantic-release#-semantic-release) to generate additionals files as well as `tagging` the branch with the new `version`.
1. A [GitHub Actions](https://github.com/features/actions) is triggered when any code is pushed to `main`. The action will `test` the build and all tests pass, it will then use [semantic-release](https://github.com/semantic-release/semantic-release#-semantic-release) to generate additionals files as well as `tagging` the branch with the new `version`.
1. Any code pushed or merged to the GitHub `main` branch will trigger a Docker build which is published to the `@latest` [DockerHub](https://hub.docker.com/) tag.
1. Any version `tag` pushed to GitHub will trigger a Docker build, and the container will be published to [DockerHub](https://hub.docker.com/) using the same version number.

4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM centos:centos6
FROM centos:centos7

#########################################
## BUILD-TIME VARIABLES ##
Expand All @@ -19,7 +19,7 @@ ENV PATH="$PATH:/opt/flexnetserver/"
#########################################
COPY /files /usr/local/bin

RUN yum install -y redhat-lsb-core-4.0 wget-1.12 && yum clean all
RUN yum install -y redhat-lsb-core-4.1 wget-1.14 && yum clean all

WORKDIR $TEMP_PATH
RUN wget --progress=bar:force -- $NLM_URL
Expand Down
72 changes: 39 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
ADLMFlexNetServer
=================
[![Docker Automated build](https://img.shields.io/docker/automated/haysclark/adlmflexnetserver.svg?maxAge=2592000)](https://hub.docker.com/r/haysclark/adlmflexnetserver/builds/) [![Docker Stars](https://img.shields.io/docker/stars/haysclark/adlmflexnetserver.svg?maxAge=2592000)](https://hub.docker.com/r/haysclark/adlmflexnetserver/) [![](https://img.shields.io/docker/pulls/haysclark/adlmflexnetserver.svg)](https://hub.docker.com/r/haysclark/adlmflexnetserver 'DockerHub') [![license](https://img.shields.io/github/license/mashape/apistatus.svg)]() [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](http://makeapullrequest.com) [![Code of conduct](https://img.shields.io/badge/code%20of-conduct-ff69b4.svg)](https://github.com/haysclark/adlmflexnetserver/blob/main/CODE_OF_CONDUCT.md) [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release#-semantic-release)
# ADLMFlexNetServer

> Unofficial Autodesk License Manager FLEXlm® Network Server container.
[![Docker Stars](https://img.shields.io/docker/stars/haysclark/adlmflexnetserver.svg?maxAge=2592000)](https://hub.docker.com/r/haysclark/adlmflexnetserver/) [![](https://img.shields.io/docker/pulls/haysclark/adlmflexnetserver.svg)](https://hub.docker.com/r/haysclark/adlmflexnetserver "DockerHub") [![license](https://img.shields.io/github/license/mashape/apistatus.svg)]() [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](http://makeapullrequest.com) [![Code of conduct](https://img.shields.io/badge/code%20of-conduct-ff69b4.svg)](https://github.com/haysclark/adlmflexnetserver/blob/main/CODE_OF_CONDUCT.md) [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release#-semantic-release)

Usage
-----
> Unofficial Autodesk License Manager FLEXlm® Network Server container.

> To use this container, simply treat it as if you were calling _lmgrd_ directly. The only caveat is that the container **ALWAYS** appends the `-z` flag when executing _lmgrd_ internally so to ensure it runs in the Foreground; otherwise, Docker believes the command has finished executing, and the container is immediately stopped.
## Usage

A typical usage example, where a single license file, `adsk_server.lic`, is saved to a local directory. This directory's path, `<local-license-path>`, is them mapped to the containers __/var/flexlm__ directory, and is finally referenced as if calling as _lmgrd_ directly: `-c /var/flexlm/adsk_server.lic`.
> To use this container, simply treat it as if you were calling _lmgrd_ directly. The only caveat is that the container **ALWAYS** appends the `-z` flag when executing _lmgrd_ internally so to ensure it runs in the Foreground; otherwise, Docker believes the command has finished executing, and the container is immediately stopped.

A typical usage example, where a single license file, `adsk_server.lic`, is saved to a local directory. This directory's path, `<local-license-path>`, is them mapped to the containers **/var/flexlm** directory, and is finally referenced as if calling as _lmgrd_ directly: `-c /var/flexlm/adsk_server.lic`.

```bash
docker run -d --mac-address=<license-mac-address> \
Expand All @@ -20,7 +19,7 @@ haysclark/adlmflexnetserver \
-c /var/flexlm/adsk_server.lic
```

Alternatively, you can map a local folder containing multiple keys to the __/var/flexlm__ directory as well.
Alternatively, you can map a local folder containing multiple keys to the **/var/flexlm** directory as well.

```bash
docker run -d --mac-address=<license-mac-address> \
Expand All @@ -29,66 +28,73 @@ docker run -d --mac-address=<license-mac-address> \
-p 2080:2080 -p 27000-27009:27000-27009 \
haysclark/adlmflexnetserver \
-c /var/flexlm/license_file_1:/var/flexlm/license_file_2
```
```

### Logging

Docker's built-in logging functionality will collect the stdout/stderr generated by _lmgrd_.
Docker's built-in logging functionality will collect the stdout/stderr generated by _lmgrd_.

```bash
docker logs <container-id>
```
```

Thus it's recommended you do **NOT** use the `-l` flag to log to a file, doing so will cause your Docker logs to be empty. Additionally, avoid using the `-t` flag when using Docker's `run` command, enabling TTL support will cause extra line breaks in your Docker logs.
Thus it's recommended you do **NOT** use the `-l` flag to log to a file, doing so will cause your Docker logs to be empty. Additionally, avoid using the `-t` flag when using Docker's `run` command, enabling TTL support will cause extra line breaks in your Docker logs.

Troubleshooting
---------------
## Troubleshooting

If you are unsure if the server is running correctly, you can log into the container.

```bash
docker exec -it <container-id> /bin/bash
```

Once in bash run:
Once in bash run:

```bash
lmutil lmstat -a -c <license-path>
```

Image Variants
--------------
## Image Variants

### haysclark/adlmflexnetserver:<version>

| Version | Description |
|------------|-----------------------------------------------------------------------|
| v1.0.0 | Uses NLM 11.13.1.2 (support pre-2020 products) |
| >= v1.0.1 | Uses NLM 11.16.2.0 (required for 2020 products / backwards compatible |
#### NLM

| Version | Description |
| --------- | --------------------------------------------------------------------- |
| >= v1.0.1 | Uses NLM 11.16.2.0 (required for 2020 products / backwards compatible |
| v1.0.0 | Uses NLM 11.13.1.2 (support pre-2020 products) |

#### CentOS

| Version | Description |
| --------- | ----------------------------------- |
| >= v1.1.0 | Uses CentOS7 (EOL on June 2024) |
| < v1.1.0 | Uses CentOS6 (EOL on November 2020) |

## Building a custom Docker image

Building a custom Docker image
------------------------------
The base container is intended to support a wide range of cases; however, some _build arguments_ have been included to allow easy access to aspects of the build process.

### Build Arguments

The following build arguments have been exposed.

| Name | Required | Description |
|---------------------|----------|---------------------------------------|
| NLM_URL | no | URL to the NLM (Network License Manager) .gz file |
| TEMP_PATH | no | temporary file path for installation |
| Name | Required | Description |
| --------- | -------- | ------------------------------------------------- |
| NLM_URL | no | URL to the NLM (Network License Manager) .gz file |
| TEMP_PATH | no | temporary file path for installation |

Usage example:

```bash
docker build --build-arg NLM_URL=<nlm-url> .
```

Resources
---------
## Resources

- [Official Docs](https://knowledge.autodesk.com/search-result/caas/downloads/content/autodesk-network-license-manager-for-linux.html)

Supports
--------
Applies to Autodesk Nastran 2015, Autodesk Nastran 2016, Autodesk Nastran 2017, Infrastructure Map Server 2014, Infrastructure Map Server 2015, Infrastructure Map Server 2016, Infrastructure Map Server 2017, Maya 2014, Maya 2015, Maya 2016, Maya 2017, Moldflow Insight 2015, Moldflow Insight 2016, Moldflow Insight 2017, MotionBuilder 2014, MotionBuilder 2015, MotionBuilder 2016, MotionBuilder 2017, Mudbox 2014, Mudbox 2015, Mudbox 2016, Mudbox 2017, Softimage 2014, Softimage 2015, Softimage 2016, VRED Design 2014, VRED Products 2017 and more.
## Supports

Applies to Autodesk Nastran 2015, Autodesk Nastran 2016, Autodesk Nastran 2017, Infrastructure Map Server 2014, Infrastructure Map Server 2015, Infrastructure Map Server 2016, Infrastructure Map Server 2017, Maya 2014, Maya 2015, Maya 2016, Maya 2017, Moldflow Insight 2015, Moldflow Insight 2016, Moldflow Insight 2017, MotionBuilder 2014, MotionBuilder 2015, MotionBuilder 2016, MotionBuilder 2017, Mudbox 2014, Mudbox 2015, Mudbox 2016, Mudbox 2017, Softimage 2014, Softimage 2015, Softimage 2016, VRED Design 2014, VRED Products 2017 and more.