All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.kuali.common.deploy.mvn.resetenv.xml Maven / Gradle / Ivy

There is a newer version: 3.0.9
Show newest version
<!--

    Copyright 2004-2013 The Kuali Foundation

    Licensed under the Educational Community License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

    http://www.opensource.org/licenses/ecl2.php

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>${parent.groupId}</groupId>
    <artifactId>${parent.artifactId}</artifactId>
    <version>${parent.version}</version>
  </parent>
  <groupId>${project.groupId}</groupId>
  <artifactId>kuali-env</artifactId>
  <version>${project.version}</version>
  <name>Kuali Environment Manager</name>
  <description>This pom contains plugin executions for resetting an environment on EC2</description>
  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.kuali.maven.plugins</groupId>
          <artifactId>ec2-maven-plugin</artifactId>
          <version>${plugin.ec2.version}</version>
          <configuration>
            <accessKey>${ec2.accessKey}</accessKey>
            <secretKey>${ec2.secretKey}</secretKey>
            <ami>${ec2.ami}</ami>
            <type>${ec2.type}</type>
            <key>${ec2.keyName}</key>
            <securityGroups>
              <param>${ec2.securityGroup}</param>
            </securityGroups>
            <userDataFile>classpath:ec2/user-data-script</userDataFile>
            <filterUserData>true</filterUserData>
            <tags>
              <tag>
                <key>Name</key>
                <value>${deploy.env.name}</value>
              </tag>
            </tags>
          </configuration>
          <dependencies>
            <dependency>
              <groupId>org.kuali.common</groupId>
              <artifactId>kuali-ec2</artifactId>
              <version>${kuali-ec2.version}</version>
            </dependency>
          </dependencies>
          <executions>
            <execution>
              <id>find</id>
              <phase>initialize</phase>
              <goals>
                <goal>findinstance</goal>
              </goals>
              <configuration>
                <tag>Name</tag>
                <value>${deploy.env.name}</value>
              </configuration>
            </execution>
            <execution>
              <id>terminate</id>
              <phase>initialize</phase>
              <goals>
                <goal>terminateinstance</goal>
              </goals>
              <configuration>
                <instanceId>${ec2.instance.id}</instanceId>
              </configuration>
            </execution>
            <execution>
              <id>tag</id>
              <phase>initialize</phase>
              <goals>
                <goal>tag</goal>
              </goals>
              <configuration>
                <resourceId>${ec2.instance.id}</resourceId>
                <tags>
                  <tag>
                    <key>Name</key>
                    <value>${deploy.env.name}-terminated</value>
                  </tag>
                </tags>
              </configuration>
            </execution>
            <execution>
              <id>launch</id>
              <phase>initialize</phase>
              <goals>
                <goal>launchinstance</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>${plugin.enforcer.version}</version>
          <executions>
            <execution>
              <id>enforce</id>
              <phase>validate</phase>
              <goals>
                <goal>enforce</goal>
              </goals>
              <configuration>
                <rules>
                  <requireProperty>
                    <property>deploy.groupId</property>
                    <message>You must provide a groupId</message>
                  </requireProperty>
                  <requireProperty>
                    <property>deploy.env</property>
                    <message>You must provide an environment</message>
                    <regex>^\d(.)*</regex>
                    <regexMessage>Environment must be a number</regexMessage>
                  </requireProperty>
                </rules>
                <fail>true</fail>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.kuali.maven.plugins</groupId>
          <artifactId>properties-maven-plugin</artifactId>
          <version>${plugin.properties.version}</version>
          <dependencies>
            <dependency>
              <groupId>${project.groupId}</groupId>
              <artifactId>${project.artifactId}</artifactId>
              <version>${project.version}</version>
            </dependency>
          </dependencies>
          <executions>
            <execution>
              <id>translate</id>
              <phase>initialize</phase>
              <goals>
                <goal>translate-properties</goal>
              </goals>
              <configuration>
                <properties>
                  <param>deploy.groupId</param>
                </properties>
              </configuration>
            </execution>
            <execution>
              <id>config</id>
              <phase>initialize</phase>
              <goals>
                <goal>read-project-properties</goal>
              </goals>
              <configuration>
                <quiet>true</quiet>
                <locations>
                  <param>classpath:org/kuali/common/deploy/common.properties</param>
                  <param>classpath:${deploy.groupId.path}/common.properties</param>
                  <param>classpath:${deploy.groupId.path}/${deploy.env.name}.properties</param>
                </locations>
              </configuration>
            </execution>
            <execution>
              <id>decrypt</id>
              <phase>initialize</phase>
              <goals>
                <goal>decryptall</goal>
              </goals>
              <configuration>
                <password>${kuali.enc.password}</password>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.kuali.maven.plugins</groupId>
          <artifactId>maven-dnsme-plugin</artifactId>
          <version>${plugin.dnsme.version}</version>
          <configuration>
            <apiKey>${dnsme.apiKey}</apiKey>
            <secretKey>${dnsme.secretKey}</secretKey>
            <ttl>${dnsme.ttl}</ttl>
            <domainName>${dnsme.domainName}</domainName>
            <recordType>${dnsme.recordType}</recordType>
          </configuration>
          <executions>
            <execution>
              <id>delete</id>
              <phase>initialize</phase>
              <goals>
                <goal>deleterecord</goal>
              </goals>
              <configuration>
                <recordName>${dnsme.recordName}</recordName>
              </configuration>
            </execution>
            <execution>
              <id>add</id>
              <phase>initialize</phase>
              <goals>
                <goal>addrecord</goal>
              </goals>
              <configuration>
                <recordName>${dnsme.recordName}</recordName>
                <!-- The dot at the end is significant. Without it, DNSME appends "kuali.org" to the end of whatever we provide. -->
                <recordValue>${ec2.instance.dns}.</recordValue>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.kuali.maven.plugins</groupId>
          <artifactId>maven-http-plugin</artifactId>
          <version>${plugin.http.version}</version>
          <executions>
            <execution>
              <id>http</id>
              <phase>initialize</phase>
              <goals>
                <goal>wait</goal>
              </goals>
              <configuration>
                <timeout>1200</timeout>
                <url>http://${ec2.instance.dns}/tomcat/logs/env.jsp</url>
              </configuration>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <artifactId>maven-enforcer-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.kuali.maven.plugins</groupId>
        <artifactId>properties-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.kuali.maven.plugins</groupId>
        <artifactId>ec2-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.kuali.maven.plugins</groupId>
        <artifactId>maven-http-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.kuali.maven.plugins</groupId>
        <artifactId>maven-dnsme-plugin</artifactId>
      </plugin>
    </plugins>
  </build>
</project>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy