Search in sources :

Example 26 with Deployment

use of io.fabric8.kubernetes.api.model.apps.Deployment in project fabric8 by jboss-fuse.

the class ContainerRegistrationTest method deployment.

@Deployment
@StartLevelAware(autostart = true)
public static Archive<?> deployment() {
    final JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "container-registration-test.jar");
    archive.addPackage(CommandSupport.class.getPackage());
    archive.setManifest(new Asset() {

        @Override
        public InputStream openStream() {
            OSGiManifestBuilder builder = OSGiManifestBuilder.newInstance();
            builder.addBundleManifestVersion(2);
            builder.addBundleSymbolicName(archive.getName());
            builder.addBundleVersion("1.0.0");
            builder.addImportPackages(ServiceLocator.class, FabricService.class);
            builder.addImportPackages("io.fabric8.git");
            builder.addImportPackages(AbstractCommand.class, Action.class);
            builder.addImportPackage("org.apache.felix.service.command;status=provisional");
            builder.addImportPackages(ConfigurationAdmin.class, ServiceTracker.class, Logger.class);
            return builder.openStream();
        }
    });
    return archive;
}
Also used : Action(org.apache.felix.gogo.commands.Action) ServiceTracker(org.osgi.util.tracker.ServiceTracker) InputStream(java.io.InputStream) AbstractCommand(org.apache.felix.gogo.commands.basic.AbstractCommand) Logger(org.slf4j.Logger) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) ServiceLocator(io.fabric8.api.gravia.ServiceLocator) FabricService(io.fabric8.api.FabricService) OSGiManifestBuilder(org.jboss.osgi.metadata.OSGiManifestBuilder) Asset(org.jboss.shrinkwrap.api.asset.Asset) ConfigurationAdmin(org.osgi.service.cm.ConfigurationAdmin) CommandSupport(io.fabric8.itests.support.CommandSupport) StartLevelAware(org.jboss.arquillian.osgi.StartLevelAware) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 27 with Deployment

use of io.fabric8.kubernetes.api.model.apps.Deployment in project fabric8 by jboss-fuse.

the class ExtendedEnsembleTest method deployment.

@Deployment
@StartLevelAware(autostart = true)
public static Archive<?> deployment() {
    final JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "extended-ensemble-test.jar");
    archive.addPackage(CommandSupport.class.getPackage());
    archive.setManifest(new Asset() {

        @Override
        public InputStream openStream() {
            OSGiManifestBuilder builder = OSGiManifestBuilder.newInstance();
            builder.addBundleManifestVersion(2);
            builder.addBundleSymbolicName(archive.getName());
            builder.addBundleVersion("1.0.0");
            builder.addImportPackages(ServiceLocator.class, FabricService.class);
            builder.addImportPackages("io.fabric8.git");
            builder.addImportPackages(AbstractCommand.class, Action.class);
            builder.addImportPackage("org.apache.felix.service.command;status=provisional");
            builder.addImportPackages(ConfigurationAdmin.class, ServiceTracker.class, Logger.class);
            return builder.openStream();
        }
    });
    return archive;
}
Also used : Action(org.apache.felix.gogo.commands.Action) ServiceTracker(org.osgi.util.tracker.ServiceTracker) InputStream(java.io.InputStream) AbstractCommand(org.apache.felix.gogo.commands.basic.AbstractCommand) Logger(org.slf4j.Logger) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) ServiceLocator(io.fabric8.api.gravia.ServiceLocator) FabricService(io.fabric8.api.FabricService) OSGiManifestBuilder(org.jboss.osgi.metadata.OSGiManifestBuilder) Asset(org.jboss.shrinkwrap.api.asset.Asset) ConfigurationAdmin(org.osgi.service.cm.ConfigurationAdmin) CommandSupport(io.fabric8.itests.support.CommandSupport) StartLevelAware(org.jboss.arquillian.osgi.StartLevelAware) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 28 with Deployment

use of io.fabric8.kubernetes.api.model.apps.Deployment in project fabric8 by jboss-fuse.

the class ExtendedJoinTest method deployment.

@Deployment
@StartLevelAware(autostart = true)
public static Archive<?> deployment() {
    final JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "extended-join-test.jar");
    archive.addPackage(CommandSupport.class.getPackage());
    archive.setManifest(new Asset() {

        @Override
        public InputStream openStream() {
            OSGiManifestBuilder builder = OSGiManifestBuilder.newInstance();
            builder.addBundleManifestVersion(2);
            builder.addBundleSymbolicName(archive.getName());
            builder.addBundleVersion("1.0.0");
            builder.addImportPackages(ServiceLocator.class, FabricService.class);
            builder.addImportPackages("io.fabric8.git");
            builder.addImportPackages(AbstractCommand.class, Action.class);
            builder.addImportPackage("org.apache.felix.service.command;status=provisional");
            builder.addImportPackages(ConfigurationAdmin.class, AdminService.class, ServiceTracker.class, Logger.class);
            return builder.openStream();
        }
    });
    return archive;
}
Also used : Action(org.apache.felix.gogo.commands.Action) AdminService(org.apache.karaf.admin.AdminService) ServiceTracker(org.osgi.util.tracker.ServiceTracker) InputStream(java.io.InputStream) AbstractCommand(org.apache.felix.gogo.commands.basic.AbstractCommand) Logger(org.slf4j.Logger) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) ServiceLocator(io.fabric8.api.gravia.ServiceLocator) FabricService(io.fabric8.api.FabricService) OSGiManifestBuilder(org.jboss.osgi.metadata.OSGiManifestBuilder) Asset(org.jboss.shrinkwrap.api.asset.Asset) ConfigurationAdmin(org.osgi.service.cm.ConfigurationAdmin) CommandSupport(io.fabric8.itests.support.CommandSupport) StartLevelAware(org.jboss.arquillian.osgi.StartLevelAware) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 29 with Deployment

use of io.fabric8.kubernetes.api.model.apps.Deployment in project fabric8 by jboss-fuse.

the class ExtendedUpgradeAndRollbackTest method deployment.

@Deployment
@StartLevelAware(autostart = true)
public static Archive<?> deployment() {
    final JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "extended-upgrade-rollback-test.jar");
    archive.addPackage(CommandSupport.class.getPackage());
    archive.setManifest(new Asset() {

        @Override
        public InputStream openStream() {
            OSGiManifestBuilder builder = OSGiManifestBuilder.newInstance();
            builder.addBundleManifestVersion(2);
            builder.addBundleSymbolicName(archive.getName());
            builder.addBundleVersion("1.0.0");
            builder.addImportPackages(ServiceLocator.class, FabricService.class);
            builder.addImportPackages("io.fabric8.git");
            builder.addImportPackages(AbstractCommand.class, Action.class);
            builder.addImportPackage("org.apache.felix.service.command;status=provisional");
            builder.addImportPackages(ConfigurationAdmin.class, ServiceTracker.class, Logger.class);
            builder.addImportPackages(CuratorFramework.class, ZooKeeperUtils.class);
            return builder.openStream();
        }
    });
    return archive;
}
Also used : Action(org.apache.felix.gogo.commands.Action) ServiceTracker(org.osgi.util.tracker.ServiceTracker) InputStream(java.io.InputStream) AbstractCommand(org.apache.felix.gogo.commands.basic.AbstractCommand) ZooKeeperUtils(io.fabric8.zookeeper.utils.ZooKeeperUtils) Logger(org.slf4j.Logger) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) ServiceLocator(io.fabric8.api.gravia.ServiceLocator) CuratorFramework(org.apache.curator.framework.CuratorFramework) FabricService(io.fabric8.api.FabricService) OSGiManifestBuilder(org.jboss.osgi.metadata.OSGiManifestBuilder) Asset(org.jboss.shrinkwrap.api.asset.Asset) ConfigurationAdmin(org.osgi.service.cm.ConfigurationAdmin) CommandSupport(io.fabric8.itests.support.CommandSupport) StartLevelAware(org.jboss.arquillian.osgi.StartLevelAware) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 30 with Deployment

use of io.fabric8.kubernetes.api.model.apps.Deployment in project fabric8 by jboss-fuse.

the class ResolverTest method deployment.

@Deployment
@StartLevelAware(autostart = true)
public static Archive<?> deployment() {
    final JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "resolver-test.jar");
    archive.addPackage(CommandSupport.class.getPackage());
    archive.setManifest(new Asset() {

        @Override
        public InputStream openStream() {
            OSGiManifestBuilder builder = OSGiManifestBuilder.newInstance();
            builder.addBundleManifestVersion(2);
            builder.addBundleSymbolicName(archive.getName());
            builder.addBundleVersion("1.0.0");
            builder.addImportPackages(ServiceLocator.class, FabricService.class);
            builder.addImportPackages("io.fabric8.git");
            builder.addImportPackages(AbstractCommand.class, Action.class);
            builder.addImportPackage("org.apache.felix.service.command;status=provisional");
            builder.addImportPackages(ConfigurationAdmin.class, ServiceTracker.class, Logger.class);
            builder.addImportPackages(CuratorFramework.class, ZooKeeperUtils.class, ZkPath.class);
            return builder.openStream();
        }
    });
    return archive;
}
Also used : Action(org.apache.felix.gogo.commands.Action) ServiceTracker(org.osgi.util.tracker.ServiceTracker) InputStream(java.io.InputStream) AbstractCommand(org.apache.felix.gogo.commands.basic.AbstractCommand) ZooKeeperUtils(io.fabric8.zookeeper.utils.ZooKeeperUtils) ZkPath(io.fabric8.zookeeper.ZkPath) Logger(org.slf4j.Logger) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) ServiceLocator(io.fabric8.api.gravia.ServiceLocator) CuratorFramework(org.apache.curator.framework.CuratorFramework) FabricService(io.fabric8.api.FabricService) OSGiManifestBuilder(org.jboss.osgi.metadata.OSGiManifestBuilder) Asset(org.jboss.shrinkwrap.api.asset.Asset) ConfigurationAdmin(org.osgi.service.cm.ConfigurationAdmin) CommandSupport(io.fabric8.itests.support.CommandSupport) StartLevelAware(org.jboss.arquillian.osgi.StartLevelAware) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Aggregations

File (java.io.File)62 Deployment (io.fabric8.kubernetes.api.model.extensions.Deployment)52 Test (org.testng.annotations.Test)50 Deployment (io.fabric8.kubernetes.api.model.apps.Deployment)47 HasMetadata (io.fabric8.kubernetes.api.model.HasMetadata)43 Container (io.fabric8.kubernetes.api.model.Container)32 Service (io.fabric8.kubernetes.api.model.Service)28 Test (org.junit.Test)28 DeploymentConfig (io.fabric8.openshift.api.model.DeploymentConfig)27 InputStream (java.io.InputStream)26 DefaultKubernetesClient (io.fabric8.kubernetes.client.DefaultKubernetesClient)25 KubernetesClient (io.fabric8.kubernetes.client.KubernetesClient)25 Deployment (org.jboss.arquillian.container.test.api.Deployment)21 OSGiManifestBuilder (org.jboss.osgi.metadata.OSGiManifestBuilder)21 Asset (org.jboss.shrinkwrap.api.asset.Asset)21 JavaArchive (org.jboss.shrinkwrap.api.spec.JavaArchive)21 IOException (java.io.IOException)20 ServiceTracker (org.osgi.util.tracker.ServiceTracker)20 FileInputStream (java.io.FileInputStream)19 CommandSupport (io.fabric8.itests.support.CommandSupport)18