Package org.platformlayer.ops

Examples of org.platformlayer.ops.OpsTarget.mkdir()


    File fstabFile = new File("/etc/fstab");
    String fstab = target.readTextFile(fstabFile);
    fstab += fstabLine;
    FileUpload.upload(target, fstabFile, fstab);

    target.mkdir(cgroupsFile);

    Command mountCommand = Command.build("mount cgroup");
    target.executeCommand(mountCommand);

    // mkdir /cgroup
View Full Code Here


    OpsTarget target = OpsContext.get().getInstance(OpsTarget.class);

    // Nexus needs a workdir; by default it's in the home directory of the user we're running under
    // With jetty, the jetty user can't create this directory; we do it
    File sonatypeDir = new File("/usr/share/jetty/sonatype-work");
    target.mkdir(sonatypeDir, "750");

    File nexusDir = new File(sonatypeDir, "nexus");
    target.mkdir(nexusDir, "750");

    File confDir = new File(nexusDir, "conf");
View Full Code Here

    // With jetty, the jetty user can't create this directory; we do it
    File sonatypeDir = new File("/usr/share/jetty/sonatype-work");
    target.mkdir(sonatypeDir, "750");

    File nexusDir = new File(sonatypeDir, "nexus");
    target.mkdir(nexusDir, "750");

    File confDir = new File(nexusDir, "conf");
    target.mkdir(confDir, "750");
    {
      String contents = ResourceUtils.get(getClass(), "conf/security.xml");
View Full Code Here

    File nexusDir = new File(sonatypeDir, "nexus");
    target.mkdir(nexusDir, "750");

    File confDir = new File(nexusDir, "conf");
    target.mkdir(confDir, "750");
    {
      String contents = ResourceUtils.get(getClass(), "conf/security.xml");
      FileUpload.upload(target, new File(confDir, "security.xml"), contents);
    }
View Full Code Here

      fstab += String.format("UUID=%s\t/\t%s\terrors=remount-ro\t0\t1\n", uuid, filesystem);

      if (supportCloudConfigDisk) {
        if (useConfigDriveSymlinks) {
          // Use configuration from cloud_config mount
          target.mkdir(new File(rootfsDir, "media/config"));
          fstab += "/dev/disk/by-label/" + configDriveLabel + "\t/media/config\tudf,iso9660\tro\t0\t0\n";
        }
      }

      FileUpload.upload(target, new File(rootfsDir, "etc/fstab"), fstab);
View Full Code Here

      if (useConfigDriveSymlinks) {
        target.rm(new File(rootfsDir, "etc/network/interfaces"));
        target.executeCommand("ln -s /media/config/etc/network/interfaces {0}", new File(rootfsDir,
            "etc/network/interfaces"));

        target.mkdir(new File(rootfsDir, "root/.ssh"));
        target.executeCommand("ln -s /media/config/root/.ssh/authorized_keys {0}", new File(rootfsDir,
            "root/.ssh/authorized_keys"));
      } else {
        String initScript = ResourceUtils.get(getClass(), "openstack-config");
        File initScriptFile = new File(rootfsDir, "etc/init.d/openstack-config");
View Full Code Here

        File adminSshDir = new File(adminHomeDir, ".ssh");
        File privateKeyFile = new File(adminSshDir, "id_rsa");
        File publicKeyFile = new File(adminSshDir, "id_rsa.pub");
        File authorizedKeys = new File(adminSshDir, "authorized_keys");

        target.mkdir(adminSshDir);

        String passphrase = "";
        target.executeCommand("ssh-keygen -t rsa -f {0} -P {1}", privateKeyFile, passphrase);

        String privateKeyData = target.readTextFile(privateKeyFile);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.