Saturday, 21 June 2014

Manage OSGi Console / Felix Console Permissions.

Namastey ,

By default only user 'admin' has got access on  OSGi console / Felix Console.
You would probably need give permission to some more user who can access this console but don't want to share admin password with them.

But this provide access to those users doesn't seems to be possible from /useradmin console of AEM , as it manages rights on repository content specifically and it doesn't have any option of OSGi console.

So , If you are in same scenario , you can follow below steps :
1. Create a group through /useradmin console of AEM, e.g osgi_console_admin
2. Add the user whom you want to provide access to OSGi console.
3. Go to Apache Sling Web Console Security Provider configuration in OSGi console through admin user.
http://host:port/system/console/configMgr/org.apache.sling.extensions.webconsolesecurityprovider.internal.SlingWebConsoleSecurityProvider

4. Add the created group name in the configurations and save .

5. You can also add username directly , but it is not a recommended approach.

Quick Tip : To change password of admin user for felix console , you can simply change the password of admin user present in /useradmin console.



Dhanywaad !!

Changing Welcome Screen or landing page in AEM aka CQ

Namastey ,

As you installed the CQ and it has opened  a welcome screen or projects page for you.

But you might want to change your landing page as per your requirement or role.

Its quite simple , you can follow below steps to get it done :
1. Go to http://host:port/system/console/configMgr/com.day.cq.commons.servlets.RootMappingServlet

2. Change the Target Path to whatever page you want your landing page to be and save it.


Screenshot : Day CQ Root Mapping Configuration


Dhanywaad,

Installing / Starting AEM aka CQ

Namastey !!

It is great to know that you are going to start with Adobe Experience Manager ( previously called CQ ). But before you install it you should rename the quickstart jar file following the conventions to get it working as per expectations.


Naming convention of quickstart jar

cq<string> - <runmode> -p<port>.jar 
example :  cq-author-4502.jar for author instance and cq-publish-4503.jar for publish instance.

1. 'cq' must be there in the first place of the name.
2.  It is recommended to write -p before port number ( it is a must if there is any other number in complete name of jar )
3. If mentioned port number is not available then aem will automatically pick port number as following 4502, 8080, 8081, 8082, 8083, 8084, 8085, 8888, 9362, <random>.

Following are two ways to install CQ / AEM : 

1. Double click the cq quickstart jar , it will automatically install the AEM.
2. You can run it through command prompt / console by running following command.

java -Xmx1024m -Xms512m -XX:MaxPermSize=512m -jar cq-author-4502.jar -nofork

Following are four ways to start CQ/AEM
1. Double click the cq quickstart jar
2. Through command prompt / console by running the command used for installation
3. You can go to \crx-quickstart\bin\ folder and start.bat . You can configure various options in start.bat to start aem as per your custom requirements , like memory parameters , runmode etc.

4.  AEM can also be installed and started as windows services from service.msc console. ( Not explained in this post to avoid complexity )

note:  starting cq by start.bat doesn't use the quickstart jar present at root folder , but the one which is present at crx-quickstart\app\


List of start up additional parameters which can be used while starting jar from script or command prompt.

Command Parameter
Description
-help (--help,-h)

Show this complete list of commands

-quickstart.server.port (-p,-port) <port>

Set server port number
-contextpath (-c,-org.apache.felix.http.context_path) <contextpath>

Set context path

-debug <port>

Enable Java Debugging on port number; forces forking
-gui

Show GUI if running on a terminal

-unpack

Unpack installation files only, do not start the server (implies
-verbose)

-v (-verbose)

Do not redirect stdout/stderr to files and do not close stdin

-nobrowser (-quickstart.nobrowser)


Do not open browser at startup
-fork

Force forking the JVM if running on a console, using recommended
default memory settings for the forked JVM.

-nofork


Do not fork the JVM, even if not running on a console

-forkargs <args> [<args> ...]

Additional arguments for the forked JVM, defaults to '-Xmx1024m

-r <string> [<string> [<string>]]

Runmode(s) - Use this to define the run mode(s)

-b <string>
Base folder - defines the path under which the quickstart work folder
is created
-low-mem-action <string>
Low memory action - what to do if memory is insufficient at startup
-use-control-port
Start a control port
-ll <level>

Define launchpad log level (1 = error...4 = debug)
-a (--interface) <interface>

Optional IP address (interface) to bind to
-pt <string>
Process type (main/fork) - do not use directly, used when forking a
process
               
Dhanywaad !!

Basic Sling Model Exporter

/* Open a page which is having component /apps/project/components/page/page /content/project/en/jcr:content.model.json Don't miss...