Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Next Release 🎉 #86

Merged
merged 32 commits into from
Apr 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
d8c1d75
Migrated to use "::" by default for #71
simonmicro Dec 7, 2022
57f2159
Default dual-stack socket
simonmicro Dec 7, 2022
f88ada3
Added workflow for different stages
simonmicro Feb 21, 2023
fe7784d
Merge pull request #79 from Py-KMS-Organization/feature/ipv6_default
simonmicro Feb 21, 2023
77e545d
Removed Etrigan support
simonmicro Dec 9, 2022
f1fa5b7
Removed Etrigan GUI support
simonmicro Dec 9, 2022
4bd6095
Removed old gui code references and variables
simonmicro Dec 9, 2022
fdf1445
Removed docs dependencies from requirements.txt
simonmicro Dec 9, 2022
5a8a21a
Removed sqliteweb support
simonmicro Dec 9, 2022
f15ed48
Switched sqlite parameter to point to file instead of dir
simonmicro Dec 9, 2022
88f96a2
Removed dummy client code
simonmicro Dec 9, 2022
767751c
Removed old graphics
simonmicro Dec 9, 2022
03c3e1c
First web UI draft
simonmicro Dec 11, 2022
28e07ac
Added sub-page for license information
simonmicro Dec 11, 2022
0cb3ee5
Added products sub-page
simonmicro Dec 11, 2022
ca7ba46
Fixed missing primary key
simonmicro Dec 11, 2022
5674e26
Added new webui support into docker
simonmicro Dec 11, 2022
37d09c6
Updated install instructions
simonmicro Dec 11, 2022
460a714
Fixed inaccessible products without clients
simonmicro Dec 11, 2022
16eb5a0
Updated some docs references to the web interface port
simonmicro Dec 11, 2022
ddf1ad8
Added note regarding the used command
simonmicro Dec 11, 2022
d3fabf3
Added web-ui screenshot
simonmicro Dec 11, 2022
d795f52
Fixed startup on minimal tag
simonmicro Dec 11, 2022
8185207
Added version metadata into container
simonmicro Dec 11, 2022
bf323f7
Added new build-args containing the version info
simonmicro Dec 11, 2022
d0d2b60
Updated changelog to today
simonmicro Dec 11, 2022
f098169
Merge pull request #82 from Py-KMS-Organization/deprecation/etrigan/r…
simonmicro Feb 21, 2023
dd1d6b7
Added missing build args to all versions
simonmicro Feb 21, 2023
81e9973
Removed all references to Docker Hub after their removal of "Free Tea…
simonmicro Mar 14, 2023
98e0900
Added /readyz and /livez endpoints
simonmicro Mar 15, 2023
32b6623
Fixed space at end of string
simonmicro Mar 15, 2023
dfbeee6
Added new endpoints
simonmicro Mar 15, 2023
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
22 changes: 10 additions & 12 deletions .github/workflows/main.yml → .github/workflows/bake_to_latest.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
name: Build Image On Release
name: Build release-tags

on:
workflow_dispatch:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
bake:
bake-latest:
runs-on: ubuntu-latest
permissions:
packages: write
Expand All @@ -24,11 +21,6 @@ jobs:
platforms: all
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Login to DockerHub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to GitHub Container Registry
uses: docker/[email protected]
with:
Expand All @@ -42,12 +34,18 @@ jobs:
file: ./docker/docker-py3-kms/Dockerfile
platforms: linux/amd64,linux/386,linux/arm64/v8,linux/arm/v7,linux/arm/v6
push: true
tags: pykmsorg/py-kms:python3,ghcr.io/py-kms-organization/py-kms:python3
tags: ghcr.io/py-kms-organization/py-kms:python3
build-args: |
BUILD_COMMIT=${{ github.sha }}
BUILD_BRANCH=${{ github.ref_name }}
- name: Build
uses: docker/build-push-action@v2
with:
context: .
file: ./docker/docker-py3-kms-minimal/Dockerfile
platforms: linux/amd64,linux/386,linux/arm64/v8,linux/arm/v7,linux/arm/v6
push: true
tags: pykmsorg/py-kms:latest,ghcr.io/py-kms-organization/py-kms:latest,pykmsorg/py-kms:minimal,ghcr.io/py-kms-organization/py-kms:minimal
tags: ghcr.io/py-kms-organization/py-kms:latest,ghcr.io/py-kms-organization/py-kms:minimal
build-args: |
BUILD_COMMIT=${{ github.sha }}
BUILD_BRANCH=${{ github.ref_name }}
51 changes: 51 additions & 0 deletions .github/workflows/bake_to_next.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Build next-tags

on:
workflow_dispatch:
push:
branches:
- next

jobs:
bake-next:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Checkout
uses: actions/[email protected]
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
with:
platforms: all
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Login to GitHub Container Registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build
uses: docker/build-push-action@v2
with:
context: .
file: ./docker/docker-py3-kms/Dockerfile
platforms: linux/amd64,linux/386,linux/arm64/v8,linux/arm/v7,linux/arm/v6
push: true
tags: ghcr.io/py-kms-organization/py-kms:python3-next
build-args: |
BUILD_COMMIT=${{ github.sha }}
BUILD_BRANCH=${{ github.ref_name }}
- name: Build
uses: docker/build-push-action@v2
with:
context: .
file: ./docker/docker-py3-kms-minimal/Dockerfile
platforms: linux/amd64,linux/386,linux/arm64/v8,linux/arm/v7,linux/arm/v6
push: true
tags: ghcr.io/py-kms-organization/py-kms:latest-next,ghcr.io/py-kms-organization/py-kms:minimal-next
build-args: |
BUILD_COMMIT=${{ github.sha }}
BUILD_BRANCH=${{ github.ref_name }}
38 changes: 38 additions & 0 deletions .github/workflows/bake_to_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Test-Build Docker Image

on:
workflow_dispatch:
push:

jobs:
bake-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
with:
platforms: all
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Build
uses: docker/build-push-action@v2
with:
context: .
file: ./docker/docker-py3-kms/Dockerfile
platforms: linux/amd64,linux/386,linux/arm64/v8,linux/arm/v7,linux/arm/v6
push: false
build-args: |
BUILD_COMMIT=${{ github.sha }}
BUILD_BRANCH=${{ github.ref_name }}
- name: Build
uses: docker/build-push-action@v2
with:
context: .
file: ./docker/docker-py3-kms-minimal/Dockerfile
platforms: linux/amd64,linux/386,linux/arm64/v8,linux/arm/v7,linux/arm/v6
push: false
build-args: |
BUILD_COMMIT=${{ github.sha }}
BUILD_BRANCH=${{ github.ref_name }}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
pykms_logserver.log*
pykms_logclient.log*
pykms_database.db*
etrigan.log*

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down
44 changes: 44 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,49 @@
# Changelog

### py-kms_2022-12-16
- Added support for new web-gui into Docker
- Implemented whole-new web-based GUI with Flask
- Removed old GUI (Etrigan) from code and resources
- Removed sqliteweb
- Removed Etrigan (GUI)

### py-kms_2022-12-07
- Added warning about Etrigan (GUI) being deprecated
- More docs (do not run on same machine as client)
- Added Docker support for multiple listen IPs
- Added graceful Docker shutdowns

### py-kms_2021-12-23
- More Windows 10/11 keys
- Fixed some deprecation warnings
- Fixed SO_REUSEPORT platform checks
- Fixed loglevel "MININFO" with Docker
- Added Docker healthcheck
- Added UID/GID change support for Docker
- Dependabot alerts

### py-kms_2021-10-22
- Integrated Office 2021 GLVK keys & database
- Docker entrypoint fixes
- Updated docs to include SQLite stuff
- Fix for undefined timezones
- Removed LOGFILE extension checks
- Added support for Windows 11

### py-kms_2021-10-07
- Helm charts for Kubernetes deployment
- Windows 2022 updates
- Faster Github Action builds

### py-kms_2021-11-12
- Addded GHCR support
- Docs table reformatted
- Updated GUI
- Windows Sandbox fix
- Added contribution guidelines
- Docker multiarch
- Reshot screenshots in docs

### py-kms_2020-10-01
- Sql database path customizable.
- Sql database file keeps different AppId.
Expand Down
21 changes: 0 additions & 21 deletions LICENSE.gui.md

This file was deleted.

6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
![repo-size](https://img.shields.io/github/repo-size/Py-KMS-Organization/py-kms)
![open-issues](https://img.shields.io/github/issues/Py-KMS-Organization/py-kms)
![last-commit](https://img.shields.io/github/last-commit/Py-KMS-Organization/py-kms/master)
![docker-pulls](https://img.shields.io/docker/pulls/pykmsorg/py-kms)
![read-the-docs](https://img.shields.io/readthedocs/py-kms)
***

Expand Down Expand Up @@ -42,10 +41,9 @@ This version of _py-kms_ is for itself a fork of the original implementation by
The wiki has been completly reworked and is now available on [readthedocs.com](https://py-kms.readthedocs.io/en/latest/). It should you provide all necessary information how to setup and to use _py-kms_ , all without clumping this readme. The documentation also houses more details about activation with _py-kms_ and how to get GVLK keys.

## Quick start
- To start the server, execute `python3 pykms_Server.py [IPADDRESS] [PORT]`, the default _IPADDRESS_ is `0.0.0.0` ( all interfaces ) and the default _PORT_ is `1688`. Note that both the address and port are optional. It's allowed to use IPv4 and IPv6 addresses. If you have a IPv6-capable dual-stack OS, a dual-stack socket is created when using a IPv6 address.
- To start the server, execute `python3 pykms_Server.py [IPADDRESS] [PORT]`, the default _IPADDRESS_ is `::` ( all interfaces ) and the default _PORT_ is `1688`. Note that both the address and port are optional. It's allowed to use IPv4 and IPv6 addresses. If you have a IPv6-capable dual-stack OS, a dual-stack socket is created when using a IPv6 address. **In case your OS does not support IPv6, make sure to explicitly specify the legacy IPv4 of `0.0.0.0`!**
- To start the server automatically using Docker, execute `docker run -d --name py-kms --restart always -p 1688:1688 ghcr.io/py-kms-organization/py-kms`.
- To show the help pages type: `python3 pykms_Server.py -h` and `python3 pykms_Client.py -h`.

## License
- _py-kms_ is [![Unlicense](https://img.shields.io/badge/license-unlicense-lightgray.svg)](https://github.com/SystemRage/py-kms/blob/master/LICENSE)
- _py-kms GUI_ is [![MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/SystemRage/py-kms/blob/master/LICENSE.gui.md) © Matteo ℱan
- _py-kms_ is [![Unlicense](https://img.shields.io/badge/license-unlicense-lightgray.svg)](https://github.com/SystemRage/py-kms/blob/master/LICENSE)
5 changes: 2 additions & 3 deletions charts/py-kms/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ For more information please refer to the Helm Install command documentation loca
| autoscaling.targetCPUUtilizationPercentage | int | `80` | |
| fullnameOverride | string | `""` | |
| image.pullPolicy | string | `"IfNotPresent"` | |
| image.repository | string | `"pykmsorg/py-kms"` | |
| image.repository | string | `"ghcr.io/py-kms-organization/py-kms"` | |
| image.tag | string | `"python3"` | |
| imagePullSecrets | list | `[]` | |
| ingress.annotations | object | `{}` | |
Expand All @@ -44,10 +44,9 @@ For more information please refer to the Helm Install command documentation loca
| podAnnotations | object | `{}` | |
| podSecurityContext | object | `{}` | |
| py-kms.environment.HWID | string | `"RANDOM"` | |
| py-kms.environment.IP | string | `"0.0.0.0"` | |
| py-kms.environment.IP | string | `"::"` | |
| py-kms.environment.LOGLEVEL | string | `"INFO"` | |
| py-kms.environment.LOGSIZE | int | `2` | |
| py-kms.environment.SQLITE | bool | `true` | |
| replicaCount | int | `1` | |
| resources | object | `{}` | |
| securityContext | object | `{}` | |
Expand Down
11 changes: 7 additions & 4 deletions charts/py-kms/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,17 @@ spec:
- name: http
containerPort: 8080
protocol: TCP
livenessProbe:
startupProbe:
httpGet:
path: /
port: http
readinessProbe:
path: /readyz
failureThreshold: 30 # 30 seconds seem to be enough under heavy workloads
periodSeconds: 1
livenessProbe:
httpGet:
path: /
path: /livez
port: http
periodSeconds: 20
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
Expand Down
5 changes: 2 additions & 3 deletions charts/py-kms/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
replicaCount: 1

image:
repository: pykmsorg/py-kms
repository: ghcr.io/py-kms-organization/py-kms
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: python3
Expand All @@ -20,8 +20,7 @@ py-kms:
LOGSIZE: 2
LOGFILE: /var/log/py-kms.log
HWID: RANDOM
SQLITE: true
IP: 0.0.0.0
IP: '::'

serviceAccount: {}
# # Specifies whether a service account should be created
Expand Down
8 changes: 3 additions & 5 deletions docker/docker-py3-kms-minimal/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This is a minimized version from docker/docker-py3-kms/Dockerfile without SQLite support to further reduce image size
FROM alpine:3.15

ENV IP 0.0.0.0
ENV IP ::
ENV PORT 1688
ENV EPID ""
ENV LCID 1033
Expand All @@ -12,15 +12,12 @@ ENV HWID RANDOM
ENV LOGLEVEL INFO
ENV LOGFILE STDOUT
ENV LOGSIZE ""
ENV TYPE MINIMAL

COPY ./py-kms /home/py-kms
COPY docker/requirements_minimal.txt /home/py-kms/requirements.txt
COPY docker/docker-py3-kms-minimal/requirements.txt /home/py-kms/requirements.txt
RUN apk add --no-cache --update \
bash \
python3 \
py3-pip \
python3-tkinter \
ca-certificates \
shadow \
tzdata \
Expand All @@ -31,6 +28,7 @@ bash \
# Fix undefined timezone, in case the user did not mount the /etc/localtime
&& ln -sf /usr/share/zoneinfo/UTC /etc/localtime

COPY ./py-kms /home/py-kms
COPY docker/entrypoint.py /usr/bin/entrypoint.py
COPY docker/start.py /usr/bin/start.py

Expand Down
2 changes: 2 additions & 0 deletions docker/docker-py3-kms-minimal/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dnspython==2.2.1
tzlocal==4.2
Loading