Git Product home page Git Product logo

cq5tools's Introduction

A collection of scripts to allow one to administrate parts of Adobe/Day Software's CQ5/WCM without having to use the GUI and thus hopefully avoid RSI. Especially useful if one is creating many instances on many machines.

Scripts

  • change-cq5-passwords - change the admin password in the five (CQ5.4) or the two (CQ5.5) places one needs to change it for it to be changed everywhere
  • cq5-replication - display replication agent logs, test replication agent configuration, and create new replication agents all from the command line
  • cq5-users - create an initial set of users

change-cq5-passwords

Defaults are localhost, port 4502, existing password of admin, and version 5.5 (as opposed to 5.4)

change-cq5-passwords --newpw s3cr3t

cq5-replication

Assumes that one wants to create replication agents that replicate to an instance that is on a port number one greater than the source instance. For example, here's the default replication configuration:

cq5-replication --command=report --pw=s3cr3t

Name                 Blocked Paused Enabled Title                transportUri                             Description         
flush                                       Dispatcher Flush     http://localhost:8000/dispatcher/invalidate.cache                     
publish              false   false  true    Default Agent        http://localhost:4503/bin/receive?sling:authRequestLogin=1                     
publish_reverse      false   false  true    Reverse Replication Agent http://localhost:4503/bin/receive?sling:authRequestLogin=1                     
static                              false   Static Agent         static:///                   

Now let's add three replication agents; one in our cage and three in the cloud:

cq5-replication --command=create --pw=s3cr3t --agents cage1 --fqdn cage.example.com
Copying publish author agent to cage1
cq5-replication --command=create --pw=s3cr3t --agents cloud1,cloud2 --fqdn cloud.example.com
Copying publish author agent to cloud1
Copying publish author agent to cloud2

cq5-replication --command=report --pw=s3cr3t

Name                 Blocked Paused Enabled Title                transportUri                             Description         
cage1                false   false  true    cage1                http://cage1.cage.example.com:4503/bin/receive?sling:authRequestLogin=1 Replication agent for cage1
cloud1               false   false  true    cloud1               http://cloud1.cloud.example.com:4503/bin/receive?sling:authRequestLogin=1 Replication agent for cloud1
cloud2               false   false  true    cloud2               http://cloud2.cloud.example.com:4503/bin/receive?sling:authRequestLogin=1 Replication agent for cloud2
flush                                       Dispatcher Flush     http://localhost:8000/dispatcher/invalidate.cache                     
publish              false   false  true    Default Agent        http://localhost:4503/bin/receive?sling:authRequestLogin=1                     
publish_reverse      false   false  true    Reverse Replication Agent http://localhost:4503/bin/receive?sling:authRequestLogin=1                     
static                              false   Static Agent         static:///  

Note that the default publish agent uses a transportUri of localhost:4503. If your source instance is running on another port, say 5502, you'll need to change the default publish agent transportUri to localhost:5503. You can do this easily with:

cq5-replication --command=pubfix --port=5502 --pw=s3cr3t

Can also run tests for replication agents and display their logs:

cq5-replication --command=test --agents=publish --pw=s3cr3t
cq5-replication --command=log --agents=publish --pw=s3cr3t

cq5-users

Setting up anything more than one or two users for an instance is time consuming in the GUI. cq5-users allows one to create users quickly and add them to groups.

cq5-users --command=create --pw=s3cr3t --installation FOO --trace

Creating user jpage
Adding group c/contributor to user jpage
Adding group c/content-authors to user jpage
Adding group w/workflow-users to user jpage
Adding group w/workflow-editors to user jpage
Creating user jbonham
Adding group c/contributor to user jbonham
Adding group c/content-authors to user jbonham
Adding group w/workflow-users to user jbonham
Adding group w/workflow-editors to user jbonham
Adding group a/administrators to user jbonham

Note that the simple format in the script:

my @gData = (
    # Last, First, Username, Installations, Admin?, Password
    'Page,Jimmy,jpage,FOO,N,QW0yPG4I','Plant,Robert,rplant,BAR,N,DmYwzi',
    'Bonham,John,jbonham,FOOBAR,Y,GQfy88uA'
    );

allows users to be a part of more than one installation. For example, John Bonham has the field FOOBAR which will include him when --installation is FOO or BAR.

cq5tools's People

Contributors

jimbrowne avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.