-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Remove aimmo from apps * Remove kubeconfig setup * Remove more GKE stuff * Remove aimmo from notif
- Loading branch information
1 parent
602a486
commit 9c91732
Showing
12 changed files
with
2 additions
and
156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,6 @@ | ||
import logging | ||
import os | ||
import time | ||
from threading import Thread | ||
|
||
import yaml | ||
from kubernetes import config | ||
|
||
CURR_DIR = os.path.abspath(os.path.dirname(__file__)) | ||
|
||
logging.basicConfig(level=logging.DEBUG) | ||
|
||
|
||
def setup_gke(): | ||
filename = os.path.join(CURR_DIR, "kubeconfig.yaml") | ||
config_dict = yaml.safe_load(open(filename, "r").read()) | ||
config_reload_interval = 15 * 60 # 15 minutes | ||
|
||
def load_kube_config_periodically(interval): | ||
while True: | ||
try: | ||
logging.info("Loading kube config") | ||
config.load_kube_config_from_dict(config_dict) | ||
except: | ||
logging.exception("Exception when calling load_kube_config_from_dict") | ||
time.sleep(interval) | ||
|
||
# Start a thread that loads kube config periodically | ||
thread = Thread( | ||
target=load_kube_config_periodically, | ||
args=(config_reload_interval,), | ||
daemon=True, | ||
) | ||
thread.start() |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,6 @@ | |
INSTALLED_APPS = ( | ||
"anymail", | ||
"deploy", | ||
"aimmo", | ||
"game", | ||
"pipeline", | ||
"portal", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,7 +62,6 @@ | |
INSTALLED_APPS = ( | ||
"anymail", | ||
"deploy", | ||
"aimmo", | ||
"game", | ||
"pipeline", | ||
"portal", | ||
|
@@ -104,7 +103,6 @@ | |
"preventconcurrentlogins.middleware.PreventConcurrentLoginsMiddleware", | ||
"csp.middleware.CSPMiddleware", | ||
"deploy.middleware.screentime_warning.ScreentimeWarningMiddleware", | ||
"aimmo.middleware.game_limit_exceeded.GameLimitExceededMiddleware", | ||
] | ||
|
||
AUTHENTICATION_BACKENDS = [ | ||
|
@@ -219,16 +217,6 @@ | |
CSRF_COOKIE_SECURE = True | ||
CSRF_USE_SESSIONS = False | ||
|
||
AIMMO_DJANGO_BASE_URL = f"https://{os.getenv('GAE_SERVICE')}-dot-decent-digit-629.appspot.com" | ||
|
||
AIMMO_GAME_SERVER_URL_FUNCTION = lambda game: ( | ||
f"{os.getenv('GAE_SERVICE')}-aimmo.codeforlife.education", | ||
f"/game-{game}/socket.io", | ||
) | ||
|
||
AIMMO_GAME_SERVER_PORT_FUNCTION = lambda game: 0 | ||
AIMMO_GAME_SERVER_SSL_FLAG = True | ||
|
||
EMAIL_ADDRESS = "[email protected]" | ||
|
||
LOCALE_PATHS = ("conf/locale",) | ||
|
@@ -301,8 +289,6 @@ def domain(): | |
"https://crowdin.com/", | ||
"https://o2.mouseflow.com/", | ||
"https://stats.g.doubleclick.net/", | ||
f"wss://{MODULE_NAME}-aimmo.codeforlife.education/", | ||
f"https://{MODULE_NAME}-aimmo.codeforlife.education/", | ||
) | ||
CSP_FONT_SRC = ( | ||
"'self'", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,12 @@ | ||
from django.http import JsonResponse | ||
|
||
import aimmo | ||
import game | ||
import portal | ||
|
||
|
||
def versions(_request): | ||
"""Return json containing the installed versions of the main packages.""" | ||
return JsonResponse({ | ||
'aimmo': aimmo.__version__, | ||
'codeforlife-portal': portal.__version__, | ||
'rapid-router': game.__version__ | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters