Package org.rhq.cassandra

Examples of org.rhq.cassandra.Deployer


                throw new StorageInstallerException(
                    "Installation cannot proceed. There are problems with one or more of "
                        + "the storage data directories.", STATUS_INVALID_FILE_PERMISSIONS);
            }

            Deployer deployer = getDeployer();
            deployer.setDeploymentOptions(deploymentOptions);
            storageBasedir.mkdirs();
            deployer.unzipDistro();
            deployer.applyConfigChanges();
            deployer.updateFilePerms();

            deployer.updateStorageAuthConf(asSet(installerInfo.hostname));

            return installerInfo;
        } catch (UnknownHostException unknownHostException) {
            throw new StorageInstallerException(
                "Failed to resolve requested binding address. Please check the installation instructions and host DNS settings"
View Full Code Here


    /**
     * This can be overridden to allow for custom deploy behavior.
     * @return a Deployer
     */
    protected Deployer getDeployer() {
        return new Deployer();
    }
View Full Code Here

            deploymentOptions.setHeapSize(defaultHeapSize);
            deploymentOptions.setHeapNewSize(defaultHeapNewSize);

            deploymentOptions.load();

            Deployer deployer = new Deployer();
            deployer.setDeploymentOptions(deploymentOptions);
            storageBasedir.mkdirs();
            deployer.unzipDistro();
            deployer.applyConfigChanges();
            deployer.updateFilePerms();

            ConfigEditor oldYamlEditor = new ConfigEditor(oldYamlFile);
            oldYamlEditor.load();
            ConfigEditor newYamlEditor = new ConfigEditor(newYamlFile);
            newYamlEditor.load();

            installerInfo.hostname = oldYamlEditor.getListenAddress();
            newYamlEditor.setListenAddress(installerInfo.hostname);
            newYamlEditor.setRpcAddress(installerInfo.hostname);

            installerInfo.cqlPort = oldYamlEditor.getNativeTransportPort();
            newYamlEditor.setNativeTransportPort(installerInfo.cqlPort);

            installerInfo.gossipPort = oldYamlEditor.getStoragePort();
            newYamlEditor.setStoragePort(installerInfo.gossipPort);

            newYamlEditor.setCommitLogDirectory(oldYamlEditor.getCommitLogDirectory());
            newYamlEditor.setSavedCachesDirectory(oldYamlEditor.getSavedCachesDirectory());
            newYamlEditor.setDataFileDirectories(oldYamlEditor.getDataFileDirectories());
            newYamlEditor.setSeeds(installerInfo.hostname);

            newYamlEditor.save();

            if (isRHQ48Install) {
                Properties jvmProps = new Properties();
                jvmProps.load(new FileInputStream(cassandraJvmPropsFile));
                PropertiesFileUpdate propertiesUpdater = new PropertiesFileUpdate(
                    cassandraJvmPropsFile.getAbsolutePath());
                jvmProps.setProperty("jmx_port", Integer.toString(installerInfo.jmxPort));

                propertiesUpdater.update(jvmProps);

                deployer.updateStorageAuthConf(asSet(installerInfo.hostname));
            } else {
                File oldStorageAuthConfFile = new File(oldConfDir, "rhq-storage-auth.conf");
                File newStorageAuthConfFile = new File(newConfDir, "rhq-storage-auth.conf");
                StreamUtil.copy(new FileInputStream(oldStorageAuthConfFile), new FileOutputStream(
                    newStorageAuthConfFile));
View Full Code Here

            schemaManager.shutdown();
        }
    }

    private void doDeployment(DeploymentOptions deploymentOptions) throws Exception {
        Deployer deployer = new Deployer();
        deployer.setDeploymentOptions(deploymentOptions);

        deployer.unzipDistro();
        deployer.applyConfigChanges();
        deployer.updateFilePerms();
        deployer.updateStorageAuthConf(Sets.newHashSet("127.0.0.1", "127.0.0.2"));

        File confDir = new File(deploymentOptions.getBasedir(), "conf");
        File cassandraJvmPropsFile = new File(confDir, "cassandra-jvm.properties");
        PropertiesFileUpdate propertiesUpdater = new PropertiesFileUpdate(cassandraJvmPropsFile.getAbsolutePath());
        Properties properties = propertiesUpdater.loadExistingProperties();
View Full Code Here

TOP

Related Classes of org.rhq.cassandra.Deployer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.