Ejemplo n.º 1
0
    def deploy_k8s(self, kube_master):
        logger.debug('Init configurator: kubernetes_configurator')
        configurator = kubernetes_configurator(hosts=self.hosts,
                                               kube_master=kube_master)
        _, kube_workers = configurator.deploy_kubernetes_cluster()

        return kube_workers
Ejemplo n.º 2
0
    def config_host(self, hosts):
        logger.info("Starting configuring Kubernetes cluster")

        logger.info("Init configurator: kubernetes_configurator")
        configurator = kubernetes_configurator(hosts)
        kube_master, kube_workers = configurator.deploy_kubernetes_cluster()
        logger.info('Kubernetes workers: %s' % kube_workers)

        self._get_credential(kube_master=kube_master)

        logger.info("Finish configuring Kubernetes cluster")
Ejemplo n.º 3
0
    def config_host(self, kube_master, kube_namespace):
        logger.debug("Init configurator: kubernetes_configurator")
        configurator = kubernetes_configurator(hosts=self.hosts, kube_master=kube_master)
        _, kube_workers = configurator.deploy_kubernetes_cluster()

        self._get_credential(kube_master)

        logger.info('Create k8s namespace "%s" for this experiment' % kube_namespace)
        configurator = k8s_resources_configurator()
        configurator.create_namespace(namespace=kube_namespace)

        self._setup_g5k_kube_volumes(kube_workers, n_pv=3)

        logger.info('Set labels for all kubernetes workers')
        self._set_kube_workers_label(kube_workers)

        logger.info("Finish deploying the Kubernetes cluster")
Ejemplo n.º 4
0
    def config_kube(self, kube_master, antidote_hosts, kube_namespace):
        logger.info("Starting configuring a Kubernetes cluster")
        logger.debug("Init configurator: kubernetes_configurator")
        configurator = kubernetes_configurator(hosts=self.hosts,
                                               kube_master=kube_master)
        configurator.deploy_kubernetes_cluster()

        self._get_credential(kube_master)

        logger.info('Create k8s namespace "%s" for this experiment' %
                    kube_namespace)
        logger.debug("Init configurator: k8s_resources_configurator")
        configurator = k8s_resources_configurator()
        configurator.create_namespace(kube_namespace)

        kube_workers = [host for host in antidote_hosts if host != kube_master]

        self._setup_g5k_kube_volumes(kube_workers, n_pv=3)

        self._set_kube_workers_label(kube_workers)

        logger.info("Finish configuring the Kubernetes cluster\n")