Skip to content

Commit

Permalink
Merge pull request #86 from Py-KMS-Organization/next
Browse files Browse the repository at this point in the history
Next Release 🎉
  • Loading branch information
simonmicro committed Apr 22, 2023
2 parents ee5be9a + dfbeee6 commit 314cefb
Show file tree
Hide file tree
Showing 40 changed files with 652 additions and 2,388 deletions.
22 changes: 10 additions & 12 deletions .github/workflows/main.yml → .github/workflows/bake_to_latest.yml
@@ -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/setup-buildx-action@v1.6.0
- name: Login to DockerHub
uses: docker/login-action@v1.10.0
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v1.10.0
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
@@ -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/checkout@v2.3.4
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
with:
platforms: all
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1.6.0
- name: Login to GitHub Container Registry
uses: docker/login-action@v1.10.0
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
@@ -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/checkout@v2.3.4
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
with:
platforms: all
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1.6.0
- 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
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
@@ -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
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
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
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
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
@@ -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
@@ -0,0 +1,2 @@
dnspython==2.2.1
tzlocal==4.2

0 comments on commit 314cefb

Please sign in to comment.