16
Rapid Deployment Models for uPortal -or- "Fast Times at Portal High" Tom Freestone Senior Developer Brigham Young University 2011 Jasig Conference 6/14/22

Rapid deployment models for uPortal

Embed Size (px)

Citation preview

Page 1: Rapid deployment models for uPortal

Rapid Deployment Models for uPortal -or- "Fast Times at Portal

High"

Tom FreestoneSenior Developer

Brigham Young University

2011 Jasig ConferenceApril 12, 2023

Page 2: Rapid deployment models for uPortal

Do More with Less

• Portals ran on large, beefy, expensive machines

• Developed Deployment Anti-patterns

Page 3: Rapid deployment models for uPortal

1. Deploy “Handraulically”

• Involves Install Cookbooks• Boring and Repetitive = Errors• Requires a Jedi Master to Debug– Don’t Get Hit by a Bus Anti-Pattern

• Not a Good Use of Resources

Page 4: Rapid deployment models for uPortal

2. But it Worked in Development …

• Assume Development Environment is the Same as Production.

• Assumptions = Killer

Page 5: Rapid deployment models for uPortal

3. One of these is not like the Others …

• Servers have Personalities• Manual Configuration / Debugging• Changes are not Propagated• Unable to Reproduce Errors

Page 6: Rapid deployment models for uPortal

Virtual Machines

• Mass produce “Servers”• Problem of Sprawl– 125% year increase in servers

• How do you deal with configuration differences between dev, test, stage, prod?

Page 7: Rapid deployment models for uPortal

Continuous Delivery (Jez Humble, David Farley)

• Empower our Portal Teams• Reduce Errors• Lower Stress• Flexibility• Everyone can Deploy Quickly

Page 8: Rapid deployment models for uPortal

1. Automate Everything Possible

• Continuous Integration– Prove your software works with each commit

• Benefits– Build is Repeatable– Early Warning of Problems– Wiring and Configuration that Works– Effective Teams

• Use Continuous Integration with Portal and Portlets

Page 9: Rapid deployment models for uPortal

2. Keep Everything in Version Control

• An Application is composed of Binaries, Data and Configuration.

• Artifact Repositories–Maven – Yum (rpm)

Page 10: Rapid deployment models for uPortal

Maven Resource Filtering(Maven Resource Plugin)

1. Enable maven resource plugin <project> ... <name>My Resources Plugin Practice Project</name> ... <build> ... <resources> <resource> <directory>src/main/resources</directory> <filtering>true</filtering></resource> ... </resources> ... </build> ... </project>

2. HelloWorld.txt

Hello ${name}

3. Command Line mvn resources:resources

Output : Hello My Resources Plugin Practice Project

Page 11: Rapid deployment models for uPortal

External Resource Filtering (Maven War Plugin)

   <build>      <plugins>        <plugin>          <groupId>org.apache.maven.plugins</groupId>          <artifactId>maven-war-plugin</artifactId>          <configuration>            <webResources>              <webResource>                <directory>${basedir}/src/main/webapp/WEB-INF</directory>                <includes>                  <include>web.xml</include>                </includes>                <targetPath>WEB-INF</targetPath>                <filtering>true</filtering>              </webResource>            </webResources>          </configuration>        </plugin>      </plugins>  </build>

Page 12: Rapid deployment models for uPortal

Build Profiles

1. pom.xml

<profiles>  <profile>    <id>development</id>    <properties>

<greeting>Welcome to Jasig</greeting> <properties>   </profile>  <profile>    <id>production</id>        <properties>

<greeting>Welcome to Denver</greeting> <properties>   </profile>

</profiles>

2. helloWorld.text

Hello ${greeting}

3. Command Line

mvn package -P production -> Hello Welcome to Denver

mvn package -P development -> Hello Welcome to Jasig

Page 13: Rapid deployment models for uPortal

Maven Overlay(Maven War Plugin)

    <build>        <plugins>            <plugin>                 <artifactId>maven-war-plugin</artifactId>                             <configuration>                                 <warName>someWar</warName>                             </configuration>                        </plugin>        </plugins>    </build>     <dependencies>        <dependency>            <groupId>edu.someUniversity</groupId>            <artifactId>someWar</artifactId>            <version>${someWar.version}</version>            <type>war</type>            <scope>runtime</scope>        </dependency>    </dependencies>     <properties>        <someWar.version>3.4.2</someWar.version>    </properties>

Page 14: Rapid deployment models for uPortal

Building an RPM

<build> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>rpm-maven-plugin</artifactId> <version>2.1-alpha-1</version> <extensions>true</extensions> ... <configuration> ... <mappings> <mapping> <directory>/tmp</directory> </mapping> </mappings> ... </configuration> ...</plugin> </plugins> </build>

<packaging>rpm</packaging>

Page 15: Rapid deployment models for uPortal

Examples

• CAS• Portlets• uPortal as a rpm

Page 16: Rapid deployment models for uPortal

Questions?