forked from marlinspike/dsopbuilder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
53 lines (43 loc) · 1.63 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
from sqlite3 import Time
from util import streams
from appsettings import AppSettings
import pathlib
import util
from util.io import *
import os
from rich.console import Console
import time
import sys
import logging
from rich import print
from rich.panel import Panel
import typer
import command.settings as settings
import command.dsop_rke2 as dsop_rke2
import command.dsop_aks as dsop_aks
import command.dsop_bigbang as dsop_bigbang
app = typer.Typer()
app.add_typer(settings.app, name="settings", help="Show and configure Settings information")
app.add_typer(dsop_rke2.app, name="rke2", help="Apply settings and build a Rancher RKE2 Cluster in Azure")
app.add_typer(dsop_aks.app, name="aks", help="Apply settings and build an AKS Cluster in Azure")
app.add_typer(dsop_bigbang.app, name="bb", help="Apply settings and deploy Big Bang to a K8S Cluster in Azure")
log_format = '%(asctime)s %(filename)s: %(message)s'
logging.basicConfig(filename='app.log', level=logging.DEBUG, format=log_format, datefmt='%Y-%m-%d %H:%M:%S')
logger = logging.getLogger(__name__)
console = Console()
_app_settings = None
_working_dir = "working"
_clone_dsop_rke2_dir = "dsop_rke2"
_clone_dsop_aks_dir = "dsop_aks"
_stream = None
_terraform_file = f"{str(pathlib.Path().resolve())}/{_working_dir}/{_clone_dsop_rke2_dir}/example/terraform.tfvars"
@app.command()
def main():
"""
Deprecated. Please use the rke2 or aks commands
"""
print(Panel.fit("PyBuilder - The Pythonic Azure Big Bang Deployment Tool\nReuben Cleetus - [email protected]"))
cout_success("run main.py --help for options")
if __name__ == '__main__':
#typer.run(apply)
app()