Skip to content

Commit c50f706

Browse files
authored
Remove license (#46)
* Removed activation license * Removing license stuff * Updated changes file
1 parent 34b64a2 commit c50f706

File tree

11 files changed

+12
-203
lines changed

11 files changed

+12
-203
lines changed

.github/workflows/provision.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ on:
1111
description: 'Version to be provisioned'
1212
required: true
1313
default: 'latest'
14-
activation_key:
15-
description: 'License Activation Key'
16-
required: false
17-
default: ''
1814
secured:
1915
description: 'Use HTTPS (SSL), -H for yes, empty for no'
2016
required: false
@@ -53,7 +49,6 @@ jobs:
5349
uses: appleboy/ssh-action@master
5450
env:
5551
HOST: ${{ github.event.inputs.host_name }}
56-
ACTIVATION_KEY: ${{ github.event.inputs.activation_key }}
5752
SECURED: ${{ github.event.inputs.secured }}
5853
VERSION: ${{ github.event.inputs.version }}
5954
ADMIN_PASSWORD: ${{ github.event.inputs.admin_password }}
@@ -63,5 +58,5 @@ jobs:
6358
username: manager
6459
key: ${{ secrets.MANAGER_SSH_KEY }}
6560
port: 22
66-
envs: HOST,ACTIVATION_KEY,SECURED,VERSION,ADMIN_PASSWORD
67-
script: bash start_manager -n $HOST -k $ACTIVATION_KEY $SECURED -v $VERSION -w $ADMIN_PASSWORD -A $EXTRA_OPTIONS
61+
envs: HOST,SECURED,VERSION,ADMIN_PASSWORD
62+
script: bash start_manager -n $HOST $SECURED -v $VERSION -w $ADMIN_PASSWORD -A $EXTRA_OPTIONS

CHANGES.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/).
44

5+
## Dev
6+
7+
### New Features
8+
9+
- It is no longer necessary to activate Daeploy with a license to get indefinite access
10+
511
## 1.2.0
612

713
### New Features

docs/source/content/advanced_tutorials/manager_configuration.rst

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ The Manager is highly configurable using environment variables.
3535
+--------------------------------------------+-----------------------+-------------------------------------------------------------+
3636
| DAEPLOY_NOTIFICATION_SMTP_PORT | null | Port to SMTP server, usually 587 or 465. |
3737
+--------------------------------------------+-----------------------+-------------------------------------------------------------+
38-
| DAEPLOY_ACTIVATION_KEY | "" | License activation key. Without key Manager lives for 12h. |
39-
+--------------------------------------------+-----------------------+-------------------------------------------------------------+
4038
| DAEPLOY_ADMIN_PASSWORD | admin | Password for the admin user. Defualt to admin. |
4139
+--------------------------------------------+-----------------------+-------------------------------------------------------------+
4240

@@ -141,7 +139,7 @@ Below we show an example of a typical production setup using the Docker CLI
141139
and the
142140
`start_manager script <https://github.com/vikinganalytics/daeploy-examples/blob/master/start_manager>`_.
143141
In the example we start a Manager instance listening on ``my.domain.com``, with HTTPS,
144-
authentication, an activated license and email notifications enabled.
142+
authentication and email notifications enabled.
145143

146144
Docker CLI
147145
^^^^^^^^^^
@@ -160,7 +158,6 @@ Docker CLI
160158
-e DAEPLOY_HOST_NAME=my.domain.com \
161159
-e DAEPLOY_PROXY_HTTPS=True \
162160
-e DAEPLOY_AUTH_ENABLED=True \
163-
-e DAEPLOY_ACTIVATION_KEY=... \
164161
-e DAEPLOY_ADMIN_PASSWORD=... \
165162
-e DAEPLOY_CONFIG_EMAIL=<some@email.com> \
166163
-e DAEPLOY_CONFIG_EMAIL_PASSWORD=<password for some@email.com> \
@@ -189,7 +186,6 @@ manager settings available.
189186
--host-name my.domain.com \
190187
--auth-enabled \
191188
--https-enabled \
192-
--activation-key ... \
193189
--admin-password ... \
194190
--config-email ... \
195191
--config-password ... \

docs/source/content/getting_started/getting_started.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,12 @@ The Daeploy python library can be installed with `pip <https://pypi.org/project/
2323

2424
Check your installation by running: ``daeploy --help`` in a terminal.
2525

26-
You will also need a manager container. To start a free trial
26+
You will also need a manager container. To start a
2727
manager running on ``localhost`` for development, run the following command:
2828

2929
>>> docker run -v /var/run/docker.sock:/var/run/docker.sock -p 80:80 -p 443:443 -d daeploy/manager:latest # doctest: +SKIP
3030

3131
You can check that it started correctly by opening http://localhost/ in your browser.
32-
The trial manager can be used without restrictions for 12 hours before it has to be restarted.
3332

3433
.. warning:: This configuration should **never** be used in production. It is missing crucial
3534
features such as authentication and secured communication. Please refer to

manager/app.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
logging_api,
1515
)
1616
from manager import proxy
17-
from manager.license import activation_key_reader_on_startup, validity_door_man
1817
from manager.database.database import initialize_db
1918
from manager.database import service_db
2019
from manager.constants import get_manager_version
@@ -77,11 +76,6 @@ def startup_event():
7776
recreate_proxy_configurations()
7877

7978

80-
# License handling
81-
app.on_event("startup")(activation_key_reader_on_startup)
82-
app.middleware("http")(validity_door_man)
83-
84-
8579
def recreate_proxy_configurations():
8680
"""Use database to recreate proxy configuration files for running services"""
8781
services = service_db.get_all_services_db()

manager/constants.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,5 @@ def notification_email_config():
115115
return sender_email, sender_pass, smtp_server, smtp_port
116116

117117

118-
def get_activation_key():
119-
return os.environ.get("DAEPLOY_ACTIVATION_KEY", "")
120-
121-
122118
def get_admin_password():
123119
return os.environ.get("DAEPLOY_ADMIN_PASSWORD", "admin")

manager/license.py

Lines changed: 0 additions & 86 deletions
This file was deleted.

manager/routers/dashboard_api.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import dash_html_components as html
77
from dash.dependencies import Input, Output
88

9-
import manager.license
109
from manager.routers.service_api import read_services, inspect_service
1110
from manager.routers.notification_api import get_notifications, delete_notifications
1211
from manager.constants import get_external_proxy_url, get_manager_version
@@ -29,11 +28,6 @@ def build_user_section():
2928
className="user-actions",
3029
children=[
3130
html.P(f"v:{get_manager_version()}", className="version-identifier"),
32-
html.P(
33-
f"Expiry date: {manager.license.EXPIRATION_TIME.date()}",
34-
id="expiry-date",
35-
className="version-identifier",
36-
),
3731
html.P(),
3832
html.A(
3933
"LOGS",
@@ -115,15 +109,6 @@ def build_tabs():
115109
)
116110

117111

118-
@app.callback(
119-
Output("expiry-date", "children"),
120-
Input("interval1", "n_intervals"),
121-
)
122-
# pylint: disable=unused-argument
123-
def update_expiry_date(interval):
124-
return f"Expiry date: {manager.license.EXPIRATION_TIME.date()}"
125-
126-
127112
@app.callback(
128113
Output("app-content", "children"),
129114
Input("app-tabs", "value"),

pinned_results.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
{
2-
"tests/manager_test/license_test.py::test_with_dev_token_1": "INFO manager.license:license.py:58 Activation code read successfully, validity time updated to: 2030-01-01 00:00:00+00:00\n",
3-
"tests/manager_test/license_test.py::test_with_mumbojumbo_token_1": "INFO manager.routers.auth_api:auth_api.py:97 Token not valid: skjdnblaknsk\nWARNING manager.license:license.py:47 Could not read activation key successfully!\n",
42
"tests/manager_test/proxy_test.py::test_default_config_middlewares_1": [
53
{
64
"forwardAuth": {

start_manager

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Copyright 2020, info@vikinganalytics.se
66
# All rights reserved.
77

8-
# Usage: start_manager [-h|--help] [-v|--version version] [-d|--docker-username docker_username] [-t|--docker-token docker_token] [-n|--host-name host_name] [-p|--http-port http_port] [-P|--https-port https_port] [-A|--auth-enabled] [-l|--log-level log_level] [-a|--disable-access-logs] [-H|--https-enabled] [-s|--https-staging-server] [-e|--config-email email] [-E|--config-password password] [-S|--smtp-server smtp_server] [-N|--smtp-port smtp_port] [-k|--activation-key activation_key]
8+
# Usage: start_manager [-h|--help] [-v|--version version] [-d|--docker-username docker_username] [-t|--docker-token docker_token] [-n|--host-name host_name] [-p|--http-port http_port] [-P|--https-port https_port] [-A|--auth-enabled] [-l|--log-level log_level] [-a|--disable-access-logs] [-H|--https-enabled] [-s|--https-staging-server] [-e|--config-email email] [-E|--config-password password] [-S|--smtp-server smtp_server] [-N|--smtp-port smtp_port]
99

1010
# Revision history:
1111
# 2020-12-21 Created by new_script ver. 3.3
@@ -42,7 +42,7 @@ signal_exit() { # Handle trapped signals
4242
}
4343

4444
usage() {
45-
echo -e "Usage: $PROGNAME -v version [-h|--help] [-d|--docker-username docker_username] [-t|--docker-token docker_token] [-n|--host-name host_name] [-p|--http-port http_port] [-P|--https-port https_port] [-A|--auth-enabled] [-l|--log-level log_level] [-a|--disable-access-logs] [-H|--https-enabled] [-s|--https-staging-server] [-e|--config-email email] [-E|--config-password password] [-S|--smtp-server smtp_server] [-N|--smtp-port smtp_port] [-k|--activation-key activation_key] [-w|--admin-password admin_password]"
45+
echo -e "Usage: $PROGNAME -v version [-h|--help] [-d|--docker-username docker_username] [-t|--docker-token docker_token] [-n|--host-name host_name] [-p|--http-port http_port] [-P|--https-port https_port] [-A|--auth-enabled] [-l|--log-level log_level] [-a|--disable-access-logs] [-H|--https-enabled] [-s|--https-staging-server] [-e|--config-email email] [-E|--config-password password] [-S|--smtp-server smtp_server] [-N|--smtp-port smtp_port] [-w|--admin-password admin_password]"
4646
}
4747

4848
help_message() {
@@ -80,8 +80,6 @@ help_message() {
8080
Where 'smtp_server' is the smtp server url.
8181
-N, --smtp-port smtp_port SMTP server port, usually 465 or 587
8282
Where 'smtp_port' is the port.
83-
-k, --activation-key License activation key
84-
Where 'activation_key' is the activation key.
8583
-w --admin-password Password for admin user
8684
Where admin_password is the password for the admin user.
8785
@@ -132,8 +130,6 @@ while [[ -n $1 ]]; do
132130
echo "SMTP email server for sending email notifications"; shift; environ="$environ -e DAEPLOY_NOTIFICATION_SMTP_SERVER=$1" ;;
133131
-N | --smtp-port)
134132
echo "SMTP server port, usually 465 or 587"; shift; environ="$environ -e DAEPLOY_NOTIFICATION_SMTP_PORT=$1" ;;
135-
-k | --activation-key)
136-
echo "License activation key"; shift; environ="$environ -e DAEPLOY_ACTIVATION_KEY=$1" ;;
137133
-w | --admin-password)
138134
echo "Admin password"; shift; environ="$environ -e DAEPLOY_ADMIN_PASSWORD=$1" ;;
139135
-* | --*)

0 commit comments

Comments
 (0)