forked from bn222/cluster-deployment-automation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
32 lines (27 loc) · 939 Bytes
/
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
from assistedInstaller import AssistedClientAutomation
from assistedInstallerService import AssistedInstallerService
from clustersConfig import ClustersConfig
from clusterDeployer import ClusterDeployer
from arguments import parse_args
def main():
args = parse_args()
cc = ClustersConfig(args.config)
if args.url == "192.168.122.1":
ais = AssistedInstallerService(args.url)
ais.start(cc["version"])
else:
print(f"Will use Assisted Installer running at {args.url}")
"""
Here we will use the AssistedClient from the aicli package from:
https://github.com/karmab/aicli
The usage details are here:
https://aicli.readthedocs.io/en/latest/
"""
ai = AssistedClientAutomation(f"{args.url}:8090")
cd = ClusterDeployer(cc, ai, args, args.secrets_path)
if args.teardown:
cd.teardown()
else:
cd.deploy()
if __name__ == "__main__":
main()