lds account integration. disclaimer this is a training not a presentation. – be prepared to learn...

30
LDS Account Integration

Upload: madlyn-preston

Post on 28-Dec-2015

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: LDS Account Integration. Disclaimer This is a training NOT a presentation. – Be prepared to learn and participate in labs Please ask questions Prerequisites:

LDS Account Integration

Page 2: LDS Account Integration. Disclaimer This is a training NOT a presentation. – Be prepared to learn and participate in labs Please ask questions Prerequisites:

Disclaimer

• This is a training NOT a presentation.– Be prepared to learn and participate in labs

• Please ask questions• Prerequisites:– Java Knowledge– Basic understanding of LDAP

Page 3: LDS Account Integration. Disclaimer This is a training NOT a presentation. – Be prepared to learn and participate in labs Please ask questions Prerequisites:

History

• In the beginning Maven and CruiseControl– Produced an .ear

• Automated config and deploy Bundles– Produced a .zip with an .ear/.war and env config– DB Migrator produced a migration .zip

• Anthill Pro replaces CruiseControl– Introduced secondary process execution

Page 4: LDS Account Integration. Disclaimer This is a training NOT a presentation. – Be prepared to learn and participate in labs Please ask questions Prerequisites:

What is LDS Account?

• LDS Account is meant to be the single source for user authentication and basic user information

• LDS Account is implemented with LDAP• LDS Account is an application for maintaining

user attributes

Page 5: LDS Account Integration. Disclaimer This is a training NOT a presentation. – Be prepared to learn and participate in labs Please ask questions Prerequisites:

LDS Account

"LDS Account is a single user name and password for any person who interacts with online LDS Church resources. LDS Account is the primary account authentication credentials for most Church sites and applications. It reduces development costs that would be incurred as the user interfaces change, or as upgrades to security and the registration process are required. Unlike previous authentication systems, LDS Account is a branded single sign-on solution that is centrally managed at ldsaccount.lds.org."

Page 6: LDS Account Integration. Disclaimer This is a training NOT a presentation. – Be prepared to learn and participate in labs Please ask questions Prerequisites:

LDS Account (cont.)

"LDS Account has become the key to accessing all the resources the Church has to offer, such as family history tools, ward and stake websites, employment resources, and more. ... The idea is to have only one username and password that you can use with all password-protected websites the Church has."

Page 7: LDS Account Integration. Disclaimer This is a training NOT a presentation. – Be prepared to learn and participate in labs Please ask questions Prerequisites:

User Details

• LDS Account also provides user information– User details– User details can be exposed through LDAP attributes,

or WAM headers, or SAML attributes

Page 8: LDS Account Integration. Disclaimer This is a training NOT a presentation. – Be prepared to learn and participate in labs Please ask questions Prerequisites:

LDS Account integration in the Stack

• Consists of two main parts– Authentication– User information (details)

Page 9: LDS Account Integration. Disclaimer This is a training NOT a presentation. – Be prepared to learn and participate in labs Please ask questions Prerequisites:

LDS Account User Details Integration

• The LDS Account module acts as a Java model for LDS Account information

• LdsAccountDetails.java is the abstraction layer for LDS Account user details integration

• Factories generate LdsAccountDetails object for each user– Factories handle the different formats in which the

raw user details attributes are provide to the application• LDAP attributes, WAM headers, SAML, …

Page 10: LDS Account Integration. Disclaimer This is a training NOT a presentation. – Be prepared to learn and participate in labs Please ask questions Prerequisites:

Lab 1

Get acquainted with LDS Account integration points

Page 11: LDS Account Integration. Disclaimer This is a training NOT a presentation. – Be prepared to learn and participate in labs Please ask questions Prerequisites:

Maven Lifecycles

• Maven uses lifecycles to orchestrate goals• Phases represent steps in a lifecycle

Default

process-resources

compile

test-compile

test

package

integration-test

install

deploy

Clean

pre-clean

clean

Site

site

site-deploy

Page 12: LDS Account Integration. Disclaimer This is a training NOT a presentation. – Be prepared to learn and participate in labs Please ask questions Prerequisites:

Executing a Lifecycle

• Lifecycles are executed by calling a phase• Phase identifies where in lifecycle to stop• Examples:– mvn test– mvn install– mvn clean install– mvn site-deploy clean– mvn clean compile package install clean

Default

process-resources

compile

test-compile

test

package

integration-test

install

deploy

Clean

pre-clean

clean

Site

site

site-deploy

Page 13: LDS Account Integration. Disclaimer This is a training NOT a presentation. – Be prepared to learn and participate in labs Please ask questions Prerequisites:

Phases in Lifecycle

• Phases in a lifecycle are mapped to plugin goals– Dictated by default, packaging type, and pom config

Default

Phases War

process-resources

compile compiler:compile

test-compile compiler:testCompile

test surefire:test

package war:war

integration-test

install install:install

deploy deploy:deploy

Clean

Phases Default

pre-clean

clean clean:clean

Site

Phases Default

site site:site

site-deploy site:deploy

Page 14: LDS Account Integration. Disclaimer This is a training NOT a presentation. – Be prepared to learn and participate in labs Please ask questions Prerequisites:

Example Binding in Pom Config

<project> … <packaging>war</packaging> <build> <plugins>

<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> <version>1.0.1</version> <executions> <execution> <goals><goal>enforce</goal></goals> <phase>compile</phase> </execution> </executions> </plugin> </plugins> </build></project>

Page 15: LDS Account Integration. Disclaimer This is a training NOT a presentation. – Be prepared to learn and participate in labs Please ask questions Prerequisites:

ALM the Lifecycle for Deployments

• Default Lifecycle builds and managing artifacts

• What might a lifecycle for application deployment look like?– Migrate database– Deploy app– Test deployed app

ALM Lifecycle

Phases alm-bundle Bindings

alm-db stack-db:migrate

alm-deploy stack-tcat:deploy

alm-test stack-test:functional-test

alm-promote

• Quiz:– clean install– alm-promote– clean install alm-promote

Page 16: LDS Account Integration. Disclaimer This is a training NOT a presentation. – Be prepared to learn and participate in labs Please ask questions Prerequisites:

Packaging the ALM Module

• ALM Module creates a .zip containing:– The project– All Dependencies– settings.xml file

• Zip can be rerun• Same artifacts

Page 17: LDS Account Integration. Disclaimer This is a training NOT a presentation. – Be prepared to learn and participate in labs Please ask questions Prerequisites:

ALM Execution Configuration

• Maven profiles represent environments• Profiles allow custom environment configuration– Choose deploy type/server– Execute different tests

• Maven properties provide configuration– Deploy Username/Password– Skip test run– Skip DB migration– Defaults in profile->properties– Can be customized on command line “-Dsome=value”

Page 18: LDS Account Integration. Disclaimer This is a training NOT a presentation. – Be prepared to learn and participate in labs Please ask questions Prerequisites:

How to execute a post build promotion?

1. Download alm zip file for project2. Execute: mvn -s settings.xml alm-promote3. Optionally add appropriate ‘-D’ parameters4. Specify env using a maven profile (e.g. -P stage)

Page 19: LDS Account Integration. Disclaimer This is a training NOT a presentation. – Be prepared to learn and participate in labs Please ask questions Prerequisites:

Lab 1

https://tech.lds.org/wiki/Using_the_ALM_Module#Lab_1

Page 20: LDS Account Integration. Disclaimer This is a training NOT a presentation. – Be prepared to learn and participate in labs Please ask questions Prerequisites:

Customizing ALM Execution

Page 21: LDS Account Integration. Disclaimer This is a training NOT a presentation. – Be prepared to learn and participate in labs Please ask questions Prerequisites:

How to Customize ALM Promotion

• Maven Plugins (Preferred)– Simplify common complex processes– Cross Platform

• Java Platform Scripts (OK)– Ant, Groovy, BeanShell, Java, etc.– Fully customizable– Cross Platform

• Shell Scripts (Worst Case)– Executed using maven-exec-plugin– Not Cross Platform

Page 22: LDS Account Integration. Disclaimer This is a training NOT a presentation. – Be prepared to learn and participate in labs Please ask questions Prerequisites:

Maven Plugin Options

• Stack Tomcat Plugin– Local and SSH Tomcat deploys

• Stack Tcat Plugin• Stack DB Migrator Plugin• Stack Test Runner• Stack Was Deploy Plugin• Maven Deploy• Maven Wagon• Maven SCM Plugin

Page 23: LDS Account Integration. Disclaimer This is a training NOT a presentation. – Be prepared to learn and participate in labs Please ask questions Prerequisites:

Java Platform Scripts

• Write custom scripts executed in Java– Cross Platform– More difficult to maintain– Common scripts will be candidates for plugins

• Maven Ant and Antrun Plugins– Very simple to execute ant scripts

• Gmaven Plugin• Maven Exec Plugin

Page 24: LDS Account Integration. Disclaimer This is a training NOT a presentation. – Be prepared to learn and participate in labs Please ask questions Prerequisites:

Shell Scripts

• Custom shell scripts packaged with alm bundle– Executed with maven-exec-plugin– Can come in handy– Not cross platform

Page 25: LDS Account Integration. Disclaimer This is a training NOT a presentation. – Be prepared to learn and participate in labs Please ask questions Prerequisites:

Lab 2

https://tech.lds.org/wiki/Using_the_ALM_Module#Lab_2

Page 26: LDS Account Integration. Disclaimer This is a training NOT a presentation. – Be prepared to learn and participate in labs Please ask questions Prerequisites:

Executing ALM Promotion in Anthill Pro

Page 27: LDS Account Integration. Disclaimer This is a training NOT a presentation. – Be prepared to learn and participate in labs Please ask questions Prerequisites:

Executing through Anthill Pro

• Anthill represents an excellent engine for executing ALM Modules– Securely store build artifacts– Can securely handle passwords– Easily add parameters to a maven build– Can track state of builds– Can record and store results from multiple test runs

Page 28: LDS Account Integration. Disclaimer This is a training NOT a presentation. – Be prepared to learn and participate in labs Please ask questions Prerequisites:

Roles of new Build System

Project Team (Developers)• Developer ALM pom.xml for

project– Functional Tests?– DB Migration?– Test Groups? (smoke, full, etc)

• Identify the Environments to enable

• Test on local box• Identify Anthill configurable

properties– Skip Plugins?– Usernames and passwords?

Build Team• Add Project to Anthill• Take configurable properties

from team add them to UI.• Enable specified

environments

Java Stack Team• Help developer ALM

Module

Page 29: LDS Account Integration. Disclaimer This is a training NOT a presentation. – Be prepared to learn and participate in labs Please ask questions Prerequisites:

Demo ALM Module and Anthill Pro

Page 30: LDS Account Integration. Disclaimer This is a training NOT a presentation. – Be prepared to learn and participate in labs Please ask questions Prerequisites:

Conclusion

• ALM Module provides promotion orchestration• Puts more control in hands of project team• Build process now separate from promotion• Anthill pro is an excellent promotion engine

• We hope to see more automated promotions in the future!!!