def __init__(self, dag, version, release_stream, platform, profile, build): self.exec_config = { "pod_override": k8s.V1Pod(spec=k8s.V1PodSpec(containers=[ k8s.V1Container( name="base", image="quay.io/mukrishn/jetski:2.0", image_pull_policy="Always", volume_mounts=[kubeconfig.get_empty_dir_volume_mount()]) ], volumes=[ kubeconfig. get_empty_dir_volume_mount() ])) } # General DAG Configuration self.dag = dag self.platform = platform # e.g. aws self.version = version # e.g. 4.6/4.7, major.minor only self.openshift_release = release_stream # true release stream to follow. Nightlies, CI, etc. self.profile = profile # e.g. default/ovn self.openshift_build = build # Specific Task Configuration self.vars = var_loader.build_task_vars(task="install", version=version, platform=platform, profile=profile) self.install_secrets = Variable.get( f"baremetal_openshift_install_config", deserialize_json=True)
def __init__(self, dag, version, release_stream, platform, profile, default_args): self.exec_config = var_loader.get_executor_config_with_cluster_access( version, platform, profile) # General DAG Configuration self.dag = dag self.platform = platform # e.g. aws self.version = version # e.g. stable/.next/.future self.release_stream = release_stream self.profile = profile # e.g. default/ovn self.default_args = default_args # Airflow Variables self.SNAPPY_DATA_SERVER_URL = Variable.get("SNAPPY_DATA_SERVER_URL") self.SNAPPY_DATA_SERVER_USERNAME = Variable.get( "SNAPPY_DATA_SERVER_USERNAME") self.SNAPPY_DATA_SERVER_PASSWORD = Variable.get( "SNAPPY_DATA_SERVER_PASSWORD") # Specific Task Configuration self.vars = var_loader.build_task_vars(task="benchmarks", version=version, platform=platform, profile=profile) self.git_name = self._git_name() self.env = { "SNAPPY_DATA_SERVER_URL": self.SNAPPY_DATA_SERVER_URL, "SNAPPY_DATA_SERVER_USERNAME": self.SNAPPY_DATA_SERVER_USERNAME, "SNAPPY_DATA_SERVER_PASSWORD": self.SNAPPY_DATA_SERVER_PASSWORD, "SNAPPY_USER_FOLDER": self.git_name }
def __init__(self, dag, version, release_stream, platform, profile, task): self.exec_config = var_loader.get_executor_config_with_cluster_access(version, platform, profile) # General DAG Configuration self.dag = dag self.platform = platform # e.g. aws self.version = version # e.g. 4.6/4.7, major.minor only self.release_stream = release_stream # true release stream to follow. Nightlies, CI, etc. self.profile = profile # e.g. default/ovn # Specific Task Configuration self.vars = var_loader.build_task_vars( task="index", version=version, platform=platform, profile=profile) # Upstream task this is to index self.task = task self.env = { "RELEASE_STREAM": self.release_stream, "TASK": self.task } self.git_user = var_loader.get_git_user() if self.git_user == 'cloud-bulldozer': self.env["ES_INDEX"] = "perf_scale_ci" else: self.env["ES_INDEX"] = f"{self.git_user}_playground"
def __init__(self, dag, version, release_stream, latest_release, platform, profile, default_args): self.exec_config = { "pod_override": k8s.V1Pod( spec=k8s.V1PodSpec( containers=[ k8s.V1Container( name="base", image="quay.io/keithwhitley4/airflow-ansible:2.1.0", image_pull_policy="Always", env=[ kubeconfig.get_kubeadmin_password( version, platform, profile) ], volume_mounts=[ kubeconfig.get_kubeconfig_volume_mount()] ) ], volumes=[kubeconfig.get_kubeconfig_volume( version, platform, profile)] ) ) } # General DAG Configuration self.dag = dag self.platform = platform # e.g. aws self.version = version # e.g. stable/.next/.future self.release_stream = release_stream self.latest_release = latest_release # latest relase from the release stream self.profile = profile # e.g. default/ovn self.default_args = default_args # Airflow Variables self.SNAPPY_DATA_SERVER_URL = Variable.get("SNAPPY_DATA_SERVER_URL") self.SNAPPY_DATA_SERVER_USERNAME = Variable.get("SNAPPY_DATA_SERVER_USERNAME") self.SNAPPY_DATA_SERVER_PASSWORD = Variable.get("SNAPPY_DATA_SERVER_PASSWORD") # Specific Task Configuration self.vars = var_loader.build_task_vars( task="utils", version=version, platform=platform, profile=profile) self.git_name=self._git_name() self.env = { "OPENSHIFT_CLIENT_LOCATION": self.latest_release["openshift_client_location"], "SNAPPY_DATA_SERVER_URL": self.SNAPPY_DATA_SERVER_URL, "SNAPPY_DATA_SERVER_USERNAME": self.SNAPPY_DATA_SERVER_USERNAME, "SNAPPY_DATA_SERVER_PASSWORD": self.SNAPPY_DATA_SERVER_PASSWORD, "SNAPPY_USER_FOLDER": self.git_name }
def __init__(self, dag, version, release_stream, latest_release, platform, profile): self.exec_config = var_loader.get_default_executor_config() # General DAG Configuration self.dag = dag self.platform = platform # e.g. aws self.version = version # e.g. 4.6/4.7, major.minor only # true release stream to follow. Nightlies, CI, etc. self.release_stream = release_stream self.latest_release = latest_release # latest relase from the release stream self.profile = profile # e.g. default/ovn # Specific Task Configuration self.vars = var_loader.build_task_vars(task="install", version=version, platform=platform, profile=profile) # Airflow Variables self.ansible_orchestrator = Variable.get("ansible_orchestrator", deserialize_json=True) self.install_secrets = Variable.get(f"openshift_install_config", deserialize_json=True) self.aws_creds = Variable.get("aws_creds", deserialize_json=True) self.gcp_creds = Variable.get("gcp_creds", deserialize_json=True) self.azure_creds = Variable.get("azure_creds", deserialize_json=True) self.ocp_pull_secret = Variable.get("osp_ocp_pull_creds") self.openstack_creds = Variable.get("openstack_creds", deserialize_json=True) # Merge all variables, prioritizing Airflow Secrets over git based vars self.config = { **self.vars, **self.ansible_orchestrator, **self.install_secrets, **self.aws_creds, **self.gcp_creds, **self.azure_creds, **self.openstack_creds, **self.latest_release, **{ "es_server": var_loader.get_elastic_url() } } super().__init__()
def __init__(self, dag, version, release_stream, platform, profile): self.exec_config = { "pod_override": k8s.V1Pod(spec=k8s.V1PodSpec(containers=[ k8s.V1Container( name="base", image="quay.io/keithwhitley4/airflow-ansible:2.0.0", image_pull_policy="Always", volume_mounts=[kubeconfig.get_kubeconfig_volume_mount()]) ], volumes=[ kubeconfig.get_kubeconfig_volume( version, platform, profile) ])) } # General DAG Configuration self.dag = dag self.platform = platform # e.g. aws self.version = version # e.g. 4.6/4.7, major.minor only self.release_stream = release_stream # true release stream to follow. Nightlies, CI, etc. self.profile = profile # e.g. default/ovn # Specific Task Configuration self.vars = var_loader.build_task_vars(task="index", version=version, platform=platform, profile=profile) self.release_stream_base_url = Variable.get("release_stream_base_url") latest_release = var_loader.get_latest_release_from_stream( self.release_stream_base_url, self.release_stream) self.env = { "OPENSHIFT_CLIENT_LOCATION": latest_release["openshift_client_location"], "RELEASE_STREAM": self.release_stream }
def __init__(self, dag, version, release_stream, platform, profile): self.exec_config = { "pod_override": k8s.V1Pod(spec=k8s.V1PodSpec( containers=[ k8s.V1Container( name="base", image="quay.io/keithwhitley4/airflow-ansible:2.0.0", image_pull_policy="Always", volume_mounts=[ kubeconfig.get_empty_dir_volume_mount() ]) ], volumes=[kubeconfig.get_empty_dir_volume_mount()])) } # General DAG Configuration self.dag = dag self.platform = platform # e.g. aws self.version = version # e.g. 4.6/4.7, major.minor only self.release_stream = release_stream # true release stream to follow. Nightlies, CI, etc. self.profile = profile # e.g. default/ovn # Specific Task Configuration self.vars = var_loader.build_task_vars(task="install", version=version, platform=platform, profile=profile) # Airflow Variables self.ansible_orchestrator = Variable.get("ansible_orchestrator", deserialize_json=True) self.release_stream_base_url = Variable.get("release_stream_base_url") self.install_secrets = Variable.get(f"openshift_install_config", deserialize_json=True) self.aws_creds = Variable.get("aws_creds", deserialize_json=True) self.gcp_creds = Variable.get("gcp_creds", deserialize_json=True) self.azure_creds = Variable.get("azure_creds", deserialize_json=True)
def __init__(self, dag, version, release_stream, platform, profile, default_args): self.exec_config = { "pod_override": k8s.V1Pod(spec=k8s.V1PodSpec(containers=[ k8s.V1Container( name="base", image="quay.io/keithwhitley4/airflow-ansible:2.0.0", image_pull_policy="Always", volume_mounts=[kubeconfig.get_kubeconfig_volume_mount()]) ], volumes=[ kubeconfig.get_kubeconfig_volume( version, platform, profile) ])) } # General DAG Configuration self.dag = dag self.platform = platform # e.g. aws self.version = version # e.g. stable/.next/.future self.release_stream = release_stream self.profile = profile # e.g. default/ovn self.default_args = default_args # Specific Task Configuration self.vars = var_loader.build_task_vars(task="benchmarks", version=version, platform=platform, profile=profile) self.release_stream_base_url = Variable.get("release_stream_base_url") latest_release = var_loader.get_latest_release_from_stream( self.release_stream_base_url, self.release_stream) self.env = { "OPENSHIFT_CLIENT_LOCATION": latest_release["openshift_client_location"] }