Search in sources :

Example 1 with AclMaintainer

use of com.yahoo.vespa.hosted.node.admin.maintenance.acl.AclMaintainer in project vespa by vespa-engine.

the class DockerAdminComponent method createNodeAdminStateUpdater.

private NodeAdminStateUpdaterImpl createNodeAdminStateUpdater() {
    if (!environment.isPresent()) {
        environment = Optional.of(new Environment(configServerConfig));
    }
    Clock clock = Clock.systemUTC();
    String dockerHostHostName = environment.get().getParentHostHostname();
    ProcessExecuter processExecuter = new ProcessExecuter();
    docker.start();
    DockerOperations dockerOperations = new DockerOperationsImpl(docker, environment.get(), processExecuter, new IPAddressesImpl());
    StorageMaintainer storageMaintainer = new StorageMaintainer(dockerOperations, processExecuter, metricReceiver, environment.get(), clock);
    AclMaintainer aclMaintainer = new AclMaintainer(dockerOperations, configServerClients.nodeRepository(), dockerHostHostName);
    Function<String, NodeAgent> nodeAgentFactory = (hostName) -> new NodeAgentImpl(hostName, configServerClients.nodeRepository(), configServerClients.orchestrator(), dockerOperations, storageMaintainer, aclMaintainer, environment.get(), clock, NODE_AGENT_SCAN_INTERVAL);
    NodeAdmin nodeAdmin = new NodeAdminImpl(dockerOperations, nodeAgentFactory, storageMaintainer, aclMaintainer, metricReceiver, clock);
    return new NodeAdminStateUpdaterImpl(configServerClients.nodeRepository(), configServerClients.orchestrator(), storageMaintainer, nodeAdmin, dockerHostHostName, clock, NODE_ADMIN_CONVERGE_STATE_INTERVAL, classLocking);
}
Also used : ConfigServerClients(com.yahoo.vespa.hosted.node.admin.configserver.ConfigServerClients) NodeAdminImpl(com.yahoo.vespa.hosted.node.admin.nodeadmin.NodeAdminImpl) NodeAdminStateUpdaterImpl(com.yahoo.vespa.hosted.node.admin.nodeadmin.NodeAdminStateUpdaterImpl) ClassLocking(com.yahoo.concurrent.classlock.ClassLocking) StorageMaintainer(com.yahoo.vespa.hosted.node.admin.maintenance.StorageMaintainer) NodeAdminStateUpdater(com.yahoo.vespa.hosted.node.admin.provider.NodeAdminStateUpdater) DockerOperationsImpl(com.yahoo.vespa.hosted.node.admin.docker.DockerOperationsImpl) DockerOperations(com.yahoo.vespa.hosted.node.admin.docker.DockerOperations) NodeAgentImpl(com.yahoo.vespa.hosted.node.admin.nodeagent.NodeAgentImpl) Function(java.util.function.Function) ConfigServerConfig(com.yahoo.vespa.hosted.node.admin.config.ConfigServerConfig) ProcessExecuter(com.yahoo.system.ProcessExecuter) MetricReceiverWrapper(com.yahoo.vespa.hosted.dockerapi.metrics.MetricReceiverWrapper) NodeAdmin(com.yahoo.vespa.hosted.node.admin.nodeadmin.NodeAdmin) Docker(com.yahoo.vespa.hosted.dockerapi.Docker) AclMaintainer(com.yahoo.vespa.hosted.node.admin.maintenance.acl.AclMaintainer) IPAddressesImpl(com.yahoo.vespa.hosted.node.admin.task.util.network.IPAddressesImpl) Duration(java.time.Duration) Clock(java.time.Clock) Optional(java.util.Optional) NodeAgent(com.yahoo.vespa.hosted.node.admin.nodeagent.NodeAgent) DockerOperationsImpl(com.yahoo.vespa.hosted.node.admin.docker.DockerOperationsImpl) ProcessExecuter(com.yahoo.system.ProcessExecuter) IPAddressesImpl(com.yahoo.vespa.hosted.node.admin.task.util.network.IPAddressesImpl) DockerOperations(com.yahoo.vespa.hosted.node.admin.docker.DockerOperations) StorageMaintainer(com.yahoo.vespa.hosted.node.admin.maintenance.StorageMaintainer) NodeAgentImpl(com.yahoo.vespa.hosted.node.admin.nodeagent.NodeAgentImpl) NodeAgent(com.yahoo.vespa.hosted.node.admin.nodeagent.NodeAgent) NodeAdmin(com.yahoo.vespa.hosted.node.admin.nodeadmin.NodeAdmin) Clock(java.time.Clock) NodeAdminImpl(com.yahoo.vespa.hosted.node.admin.nodeadmin.NodeAdminImpl) NodeAdminStateUpdaterImpl(com.yahoo.vespa.hosted.node.admin.nodeadmin.NodeAdminStateUpdaterImpl) AclMaintainer(com.yahoo.vespa.hosted.node.admin.maintenance.acl.AclMaintainer)

Aggregations

ClassLocking (com.yahoo.concurrent.classlock.ClassLocking)1 ProcessExecuter (com.yahoo.system.ProcessExecuter)1 Docker (com.yahoo.vespa.hosted.dockerapi.Docker)1 MetricReceiverWrapper (com.yahoo.vespa.hosted.dockerapi.metrics.MetricReceiverWrapper)1 ConfigServerConfig (com.yahoo.vespa.hosted.node.admin.config.ConfigServerConfig)1 ConfigServerClients (com.yahoo.vespa.hosted.node.admin.configserver.ConfigServerClients)1 DockerOperations (com.yahoo.vespa.hosted.node.admin.docker.DockerOperations)1 DockerOperationsImpl (com.yahoo.vespa.hosted.node.admin.docker.DockerOperationsImpl)1 StorageMaintainer (com.yahoo.vespa.hosted.node.admin.maintenance.StorageMaintainer)1 AclMaintainer (com.yahoo.vespa.hosted.node.admin.maintenance.acl.AclMaintainer)1 NodeAdmin (com.yahoo.vespa.hosted.node.admin.nodeadmin.NodeAdmin)1 NodeAdminImpl (com.yahoo.vespa.hosted.node.admin.nodeadmin.NodeAdminImpl)1 NodeAdminStateUpdaterImpl (com.yahoo.vespa.hosted.node.admin.nodeadmin.NodeAdminStateUpdaterImpl)1 NodeAgent (com.yahoo.vespa.hosted.node.admin.nodeagent.NodeAgent)1 NodeAgentImpl (com.yahoo.vespa.hosted.node.admin.nodeagent.NodeAgentImpl)1 NodeAdminStateUpdater (com.yahoo.vespa.hosted.node.admin.provider.NodeAdminStateUpdater)1 IPAddressesImpl (com.yahoo.vespa.hosted.node.admin.task.util.network.IPAddressesImpl)1 Clock (java.time.Clock)1 Duration (java.time.Duration)1 Optional (java.util.Optional)1