SlideShare ist ein Scribd-Unternehmen logo
1 von 31
Downloaden Sie, um offline zu lesen
EUROPE'S LEADING AEM DEVELOPER CONFERENCE


27th – 29th SEPTEMBER 2021


Images: stock.adobe.com, unless otherwise specified - slides revision: 2021-09-29


a mini-language for content repository initialization


repoinit


Bertrand Delacrétaz - Adobe & Apache - @bdelacretaz - grep.codeconsult.ch
Apache Sling repoinit - Bertrand Delacrétaz, Adobe - September 2021 2
what's repoinit?


how to use it?


how to write a parser?


test-driven software?
Apache Sling repoinit - Bertrand Delacrétaz, Adobe - September 2021 3
a "boots in the mud" talk, for once
what is repoinit?
Apache Sling repoinit - Bertrand Delacrétaz, Adobe - September 2021 5
repoinit?
https://sling.apache.org/documentation/bundles/repository-initialization.html
JCR startup SlingRepositoryInitializers
repoinit scripts
register SlingRepository
successful?
set ACL on /libs,/app
s

allow jcr:read for alice, bo
b

allow jcr:all for content-admin
s

end
An Apache Sling mini-language for content repository initialization
Apache Sling repoinit - Bertrand Delacrétaz, Adobe - September 2021 6
Quick, set it up before they see it!
https://sling.apache.org/documentation/bundles/repository-initialization.html
history
Apache Sling repoinit - Bertrand Delacrétaz, Adobe - September 2021 8
history
"We need to initialize a number of things when starting Sling on a new or existing content repository"


January 2016
https://issues.apache.org/jira/browse/SLING-5449


(great) discussion: https://s.apache.org/repoinit-2016


syntax idea: https://issues.apache.org/jira/browse/JCRVLT-61- credits to Tobias Bocanegra
usage
Apache Sling repoinit - Bertrand Delacrétaz, Adobe - September 2021 10
usage
JCR startup SlingRepositoryInitializers
repoinit scripts
register SlingRepository
successful?
runs at startup
if not, fail LOUDLY: no content repository !
script sources:


OSGi Feature Model


OSGI configs


URLs
Apache Sling repoinit - Bertrand Delacrétaz, Adobe - September 2021 11
also: explicit parsing and execution
If needed for
specific


use cases..
examples
PACKED


examples section ahead


feel free to ask questions!
Apache Sling repoinit - Bertrand Delacrétaz, Adobe - September 2021 14
la doc! la doc!
https://sling.apache.org/documentation/


bundles/repository-initialization.html
Apache Sling repoinit - Bertrand Delacrétaz, Adobe - September 2021 15
create paths and set properties
create path /one/two/thre
e

create path (sling:Folder) /var/disc(nt:unstructured)/afolde
r

create path /five(mixin nt:art)/step(mixin nt:dance)/two/steps



set properties on /pathA, /path/
B

set sling:ResourceType{String} to /x/y/
z

default someLong{Long} to 4
2

set someFlag{Boolean} to tru
e

default someDate{Date} to "2020-03-19T11:39:33.437+05:30
"

set customMultiValueStringProp to test1, test
2

en
d
Apache Sling repoinit - Bertrand Delacrétaz, Adobe - September 2021 16
manage (service) users
create service user bob,alice, tom2
1

create service user leo with path /some/absolute/pat
h

delete service user Leonardo,Winston_3
2

disable service user svcA : "This explains why it's disabled
"

create user AF with forced path /path/user/A
F

create user userC with password plain_text_only_for_testin
g

delete user userC
Apache Sling repoinit - Bertrand Delacrétaz, Adobe - September 2021 17
groups
create group group
a

create group groupb with path /thePath
F

create group groupc with forced path /thePath
G

add user1,user2 to group group
D

remove user3,user5 from group group
E

delete group group
a

set properties on authorizable(groupD
)

set stringProp to "hello, group D
"

en
d

set properties on authorizable(user3)/neste
d

set stringProp to "hello, nested!
"

en
d
Apache Sling repoinit - Bertrand Delacrétaz, Adobe - September 2021 18
Access Control Lists (ACL)
set principal ACL for principal1,principal
2

allow jcr:all on /conten
t

allow jcr:namespaceManagement on :repository
 

deny jcr:write on /var/secret
s

remove * on /libs,/app
s

en
d

set ACL on home(jack),/tmp/
a

allow jcr:read for alic
e

deny jcr:read for user2 restriction(rep:itemNames,p1,p2
)

en
d

delete ACL on /conten
t

delete principal ACL for ada, am
y
Apache Sling repoinit - Bertrand Delacrétaz, Adobe - September 2021 19
Interlude: how big? how fast?
Test script at https://gist.github.com/bdelacretaz/5ece181782206c0c9f820a78e6baaeef
With limit = 5000:


(20000 repoinit operations)


Parsing: 127 msec


Execution: 23868 msec


About 1000 ops / second


on my 2018 macbook pro


on a local Sling Starter instance
for i in 1 to $LIMIT


do


create service user LU-$i


create path /tmp/repoinit-three/mod-1/lu-$i


set ACL for LU-$i


allow jcr:all on /tmp/repoinit-three/mod-1/lu-$i


end


set ACL on /tmp/repoinit-three/mod-1/lu-$i


deny jcr:read for everyone


end


done
Session.save()
RepoInitParser
Test Script JcrRepoInitOpsProcessor
Apache Sling repoinit - Bertrand Delacrétaz, Adobe - September 2021 20
JCR node types and namespaces
register nodetypes
<<==
=

<slingevent='http://sling.apache.org/jcr/event/1.0'
>

<nt='http://www.jcp.org/jcr/nt/1.0'
>

<mix='http://www.jcp.org/jcr/mix/1.0'
>

 

[slingevent:Event] > nt:unstructured, nt:hierarchyNod
e

- slingevent:topic (string
)

- slingevent:application (string
)

===>
>

register namespace (testing) uri:some-uri/V/1.
0
Apache Sling repoinit - Bertrand Delacrétaz, Adobe - September 2021 21
privileges
register privilege simplePriv
A

register privilege ns:simplePriv
B

register abstract privilege abstract
A

register abstract privilege ns:abstract
B
Apache Sling repoinit - Bertrand Delacrétaz, Adobe - September 2021 22
summary
create path, set properties, default value
s

create (service) user, delete, disabl
e

create group, add/remove users, delet
e

set ACL on paths or for principals, remove
*

register JCR node types and namespaces
register privileges
Apache Sling repoinit - Bertrand Delacrétaz, Adobe - September 2021 23
repoinit vs content packages?
repoinit:


diffable


tracable evolution


failures prevent startup


(good for critical setup)
repoinit for repository setup,


content packages for actual content?


WDYT?
content packages:


complex content structures


project modularization
under the hood!
writing a parser?
please


DO NOT


write parsers


BY HAND


unless you know


EXACTLY


what you are doing
Apache Sling repoinit - Bertrand Delacrétaz, Adobe - September 2021 27
see also: https://javacc.org and


https://notes.eatonphil.com/parser-generators-vs-handwritten-parsers-survey-2021.html
please


DO NOT


write parsers


BY HAND


unless you know


EXACTLY


what you are doing
The repoinit parser code is


maintainable


testable


understandable


Thanks to the use of a parser generator (JavaCC)
void deleteAclPrincipals(List<Operation> result)
:

{

<DELETE> <ACL> <FOR> p = principalsList(
)

( <EOL> | <EOF>
)

{

result.add(new DeleteAclPrincipals(p))
;

}

}
test-driven software
Apache Sling repoinit - Bertrand Delacrétaz, Adobe - September 2021 29
test-driven software
31 commented test scenarios


drive the design, implementation and documentation


(text files, input + expected output)


https://sling.apache.org/documentation/bundles/repository-initialization.html
concatenate
coda
Apache Sling repoinit - Bertrand Delacrétaz, Adobe - September 2021 31
repoinit!
reliable repository initialization
I'm @bdelacretaz , thanks for watching!


more at https://sling.apache.org/documentation/bundles/repository-initialization.html


on parsing: https://pinboard.in/u:bdelacretaz/t:parsing/


ongoing improvements
robust software
JCR startup SlingRepositoryInitializers
repoinit scripts
register SlingRepository
successful?
set ACL on home(jack),/tmp/
a

allow jcr:read for alic
e

deny jcr:read for bo
b

end
clean syntax

Weitere ähnliche Inhalte

Was ist angesagt?

Synology product training - DSM introduction
Synology product training - DSM introductionSynology product training - DSM introduction
Synology product training - DSM introductionWayne An
 
Zusammenführung von HCL Nomad Web und Domino ohne SafeLinx - So gehts
Zusammenführung von HCL Nomad Web und Domino ohne SafeLinx - So gehtsZusammenführung von HCL Nomad Web und Domino ohne SafeLinx - So gehts
Zusammenführung von HCL Nomad Web und Domino ohne SafeLinx - So gehtspanagenda
 
How to export import a mysql database via ssh in aws lightsail wordpress rizw...
How to export import a mysql database via ssh in aws lightsail wordpress rizw...How to export import a mysql database via ssh in aws lightsail wordpress rizw...
How to export import a mysql database via ssh in aws lightsail wordpress rizw...AlexRobert25
 
Build a High Available NFS Cluster Based on CephFS - Shangzhong Zhu
Build a High Available NFS Cluster Based on CephFS - Shangzhong ZhuBuild a High Available NFS Cluster Based on CephFS - Shangzhong Zhu
Build a High Available NFS Cluster Based on CephFS - Shangzhong ZhuCeph Community
 
Room 1 - 4 - Phạm Tường Chiến & Trần Văn Thắng - Deliver managed Kubernetes C...
Room 1 - 4 - Phạm Tường Chiến & Trần Văn Thắng - Deliver managed Kubernetes C...Room 1 - 4 - Phạm Tường Chiến & Trần Văn Thắng - Deliver managed Kubernetes C...
Room 1 - 4 - Phạm Tường Chiến & Trần Văn Thắng - Deliver managed Kubernetes C...Vietnam Open Infrastructure User Group
 
[NDC17] Kubernetes로 개발서버 간단히 찍어내기
[NDC17] Kubernetes로 개발서버 간단히 찍어내기[NDC17] Kubernetes로 개발서버 간단히 찍어내기
[NDC17] Kubernetes로 개발서버 간단히 찍어내기SeungYong Oh
 
Red Hat Satellite 6 - Automation with Puppet
Red Hat Satellite 6 - Automation with PuppetRed Hat Satellite 6 - Automation with Puppet
Red Hat Satellite 6 - Automation with PuppetMichael Lessard
 
UDA-Componentes RUP. Reporting
UDA-Componentes RUP. ReportingUDA-Componentes RUP. Reporting
UDA-Componentes RUP. ReportingAnder Martinez
 
Docker 기반 개발환경 구축 - XE Open seminar #2
Docker 기반 개발환경 구축 - XE Open seminar #2Docker 기반 개발환경 구축 - XE Open seminar #2
Docker 기반 개발환경 구축 - XE Open seminar #2XpressEngine
 
Docker and kubernetes
Docker and kubernetesDocker and kubernetes
Docker and kubernetesDongwon Kim
 
UDA-Componentes RUP. Tabla.v2.4.6
UDA-Componentes RUP. Tabla.v2.4.6UDA-Componentes RUP. Tabla.v2.4.6
UDA-Componentes RUP. Tabla.v2.4.6Ander Martinez
 
Android booting sequece and setup and debugging
Android booting sequece and setup and debuggingAndroid booting sequece and setup and debugging
Android booting sequece and setup and debuggingUtkarsh Mankad
 
An introduction to Maven
An introduction to MavenAn introduction to Maven
An introduction to MavenJoao Pereira
 
HPE Data Protector Administrator's Guide
HPE Data Protector Administrator's GuideHPE Data Protector Administrator's Guide
HPE Data Protector Administrator's GuideAndrey Karpov
 
Introduction to Git for Artists
Introduction to Git for ArtistsIntroduction to Git for Artists
Introduction to Git for ArtistsDavid Newbury
 
virtualization-vs-containerization-paas
virtualization-vs-containerization-paasvirtualization-vs-containerization-paas
virtualization-vs-containerization-paasrajdeep
 
Moving From Actions & Behaviors to Microservices
Moving From Actions & Behaviors to MicroservicesMoving From Actions & Behaviors to Microservices
Moving From Actions & Behaviors to MicroservicesJeff Potts
 
DevOps best practices with OpenShift
DevOps best practices with OpenShiftDevOps best practices with OpenShift
DevOps best practices with OpenShiftMichael Lehmann
 

Was ist angesagt? (20)

OSGi Presentation
OSGi PresentationOSGi Presentation
OSGi Presentation
 
Synology product training - DSM introduction
Synology product training - DSM introductionSynology product training - DSM introduction
Synology product training - DSM introduction
 
Zusammenführung von HCL Nomad Web und Domino ohne SafeLinx - So gehts
Zusammenführung von HCL Nomad Web und Domino ohne SafeLinx - So gehtsZusammenführung von HCL Nomad Web und Domino ohne SafeLinx - So gehts
Zusammenführung von HCL Nomad Web und Domino ohne SafeLinx - So gehts
 
How to export import a mysql database via ssh in aws lightsail wordpress rizw...
How to export import a mysql database via ssh in aws lightsail wordpress rizw...How to export import a mysql database via ssh in aws lightsail wordpress rizw...
How to export import a mysql database via ssh in aws lightsail wordpress rizw...
 
Docker internals
Docker internalsDocker internals
Docker internals
 
Build a High Available NFS Cluster Based on CephFS - Shangzhong Zhu
Build a High Available NFS Cluster Based on CephFS - Shangzhong ZhuBuild a High Available NFS Cluster Based on CephFS - Shangzhong Zhu
Build a High Available NFS Cluster Based on CephFS - Shangzhong Zhu
 
Room 1 - 4 - Phạm Tường Chiến & Trần Văn Thắng - Deliver managed Kubernetes C...
Room 1 - 4 - Phạm Tường Chiến & Trần Văn Thắng - Deliver managed Kubernetes C...Room 1 - 4 - Phạm Tường Chiến & Trần Văn Thắng - Deliver managed Kubernetes C...
Room 1 - 4 - Phạm Tường Chiến & Trần Văn Thắng - Deliver managed Kubernetes C...
 
[NDC17] Kubernetes로 개발서버 간단히 찍어내기
[NDC17] Kubernetes로 개발서버 간단히 찍어내기[NDC17] Kubernetes로 개발서버 간단히 찍어내기
[NDC17] Kubernetes로 개발서버 간단히 찍어내기
 
Red Hat Satellite 6 - Automation with Puppet
Red Hat Satellite 6 - Automation with PuppetRed Hat Satellite 6 - Automation with Puppet
Red Hat Satellite 6 - Automation with Puppet
 
UDA-Componentes RUP. Reporting
UDA-Componentes RUP. ReportingUDA-Componentes RUP. Reporting
UDA-Componentes RUP. Reporting
 
Docker 기반 개발환경 구축 - XE Open seminar #2
Docker 기반 개발환경 구축 - XE Open seminar #2Docker 기반 개발환경 구축 - XE Open seminar #2
Docker 기반 개발환경 구축 - XE Open seminar #2
 
Docker and kubernetes
Docker and kubernetesDocker and kubernetes
Docker and kubernetes
 
UDA-Componentes RUP. Tabla.v2.4.6
UDA-Componentes RUP. Tabla.v2.4.6UDA-Componentes RUP. Tabla.v2.4.6
UDA-Componentes RUP. Tabla.v2.4.6
 
Android booting sequece and setup and debugging
Android booting sequece and setup and debuggingAndroid booting sequece and setup and debugging
Android booting sequece and setup and debugging
 
An introduction to Maven
An introduction to MavenAn introduction to Maven
An introduction to Maven
 
HPE Data Protector Administrator's Guide
HPE Data Protector Administrator's GuideHPE Data Protector Administrator's Guide
HPE Data Protector Administrator's Guide
 
Introduction to Git for Artists
Introduction to Git for ArtistsIntroduction to Git for Artists
Introduction to Git for Artists
 
virtualization-vs-containerization-paas
virtualization-vs-containerization-paasvirtualization-vs-containerization-paas
virtualization-vs-containerization-paas
 
Moving From Actions & Behaviors to Microservices
Moving From Actions & Behaviors to MicroservicesMoving From Actions & Behaviors to Microservices
Moving From Actions & Behaviors to Microservices
 
DevOps best practices with OpenShift
DevOps best practices with OpenShiftDevOps best practices with OpenShift
DevOps best practices with OpenShift
 

Ähnlich wie Repoinit: a mini-language for content repository initialization

Puppet at Opera Sofware - PuppetCamp Oslo 2013
Puppet at Opera Sofware - PuppetCamp Oslo 2013Puppet at Opera Sofware - PuppetCamp Oslo 2013
Puppet at Opera Sofware - PuppetCamp Oslo 2013Cosimo Streppone
 
Istio Playground
Istio PlaygroundIstio Playground
Istio PlaygroundQAware GmbH
 
Deep Dive Java 17 Devoxx UK
Deep Dive Java 17 Devoxx UKDeep Dive Java 17 Devoxx UK
Deep Dive Java 17 Devoxx UKJosé Paumard
 
Vagrant or docker for java dev environment
Vagrant or docker for java dev environmentVagrant or docker for java dev environment
Vagrant or docker for java dev environmentOrest Ivasiv
 
Optimizing Spring Boot apps for Docker
Optimizing Spring Boot apps for DockerOptimizing Spring Boot apps for Docker
Optimizing Spring Boot apps for DockerGraham Charters
 
PHP on Heroku: Deploying and Scaling Apps in the Cloud
PHP on Heroku: Deploying and Scaling Apps in the CloudPHP on Heroku: Deploying and Scaling Apps in the Cloud
PHP on Heroku: Deploying and Scaling Apps in the CloudSalesforce Developers
 
A JCR view of the world - everything is content, everything is a tree
A JCR view of the world - everything is content, everything is a treeA JCR view of the world - everything is content, everything is a tree
A JCR view of the world - everything is content, everything is a treeBertrand Delacretaz
 
maXbox Starter87
maXbox Starter87maXbox Starter87
maXbox Starter87Max Kleiner
 
Squeezing Machine Learning into Serverless for Image Recognition - AWS Meetup...
Squeezing Machine Learning into Serverless for Image Recognition - AWS Meetup...Squeezing Machine Learning into Serverless for Image Recognition - AWS Meetup...
Squeezing Machine Learning into Serverless for Image Recognition - AWS Meetup...Chris Shenton
 
Amazon Web Services and Docker: from developing to production
Amazon Web Services and Docker: from developing to productionAmazon Web Services and Docker: from developing to production
Amazon Web Services and Docker: from developing to productionPaolo latella
 
Scaleable PHP Applications in Kubernetes
Scaleable PHP Applications in KubernetesScaleable PHP Applications in Kubernetes
Scaleable PHP Applications in KubernetesRobert Lemke
 
Kubernetes laravel and kubernetes
Kubernetes   laravel and kubernetesKubernetes   laravel and kubernetes
Kubernetes laravel and kubernetesWilliam Stewart
 
BBL Premiers pas avec Docker
BBL Premiers pas avec DockerBBL Premiers pas avec Docker
BBL Premiers pas avec Dockerkanedafromparis
 
KubeCon EU 2016: Kubernetes and the Potential for Higher Level Interfaces
KubeCon EU 2016: Kubernetes and the Potential for Higher Level InterfacesKubeCon EU 2016: Kubernetes and the Potential for Higher Level Interfaces
KubeCon EU 2016: Kubernetes and the Potential for Higher Level InterfacesKubeAcademy
 
Encode x NEAR: Technical Overview of NEAR 1
Encode x NEAR: Technical Overview of NEAR 1Encode x NEAR: Technical Overview of NEAR 1
Encode x NEAR: Technical Overview of NEAR 1KlaraOrban
 

Ähnlich wie Repoinit: a mini-language for content repository initialization (20)

Puppet at Opera Sofware - PuppetCamp Oslo 2013
Puppet at Opera Sofware - PuppetCamp Oslo 2013Puppet at Opera Sofware - PuppetCamp Oslo 2013
Puppet at Opera Sofware - PuppetCamp Oslo 2013
 
Istio Playground
Istio PlaygroundIstio Playground
Istio Playground
 
Deep Dive Java 17 Devoxx UK
Deep Dive Java 17 Devoxx UKDeep Dive Java 17 Devoxx UK
Deep Dive Java 17 Devoxx UK
 
Vagrant or docker for java dev environment
Vagrant or docker for java dev environmentVagrant or docker for java dev environment
Vagrant or docker for java dev environment
 
Docker in production
Docker in productionDocker in production
Docker in production
 
Optimizing Spring Boot apps for Docker
Optimizing Spring Boot apps for DockerOptimizing Spring Boot apps for Docker
Optimizing Spring Boot apps for Docker
 
PHP on Heroku: Deploying and Scaling Apps in the Cloud
PHP on Heroku: Deploying and Scaling Apps in the CloudPHP on Heroku: Deploying and Scaling Apps in the Cloud
PHP on Heroku: Deploying and Scaling Apps in the Cloud
 
A JCR view of the world - everything is content, everything is a tree
A JCR view of the world - everything is content, everything is a treeA JCR view of the world - everything is content, everything is a tree
A JCR view of the world - everything is content, everything is a tree
 
Docker Compose Explained
Docker Compose ExplainedDocker Compose Explained
Docker Compose Explained
 
maXbox Starter87
maXbox Starter87maXbox Starter87
maXbox Starter87
 
Squeezing Machine Learning into Serverless for Image Recognition - AWS Meetup...
Squeezing Machine Learning into Serverless for Image Recognition - AWS Meetup...Squeezing Machine Learning into Serverless for Image Recognition - AWS Meetup...
Squeezing Machine Learning into Serverless for Image Recognition - AWS Meetup...
 
One-Man Ops
One-Man OpsOne-Man Ops
One-Man Ops
 
Amazon Web Services and Docker: from developing to production
Amazon Web Services and Docker: from developing to productionAmazon Web Services and Docker: from developing to production
Amazon Web Services and Docker: from developing to production
 
Scaleable PHP Applications in Kubernetes
Scaleable PHP Applications in KubernetesScaleable PHP Applications in Kubernetes
Scaleable PHP Applications in Kubernetes
 
Quick and Solid - Baremetal on OpenStack | Rico Lin
Quick and Solid - Baremetal on OpenStack | Rico LinQuick and Solid - Baremetal on OpenStack | Rico Lin
Quick and Solid - Baremetal on OpenStack | Rico Lin
 
Kubernetes laravel and kubernetes
Kubernetes   laravel and kubernetesKubernetes   laravel and kubernetes
Kubernetes laravel and kubernetes
 
BBL Premiers pas avec Docker
BBL Premiers pas avec DockerBBL Premiers pas avec Docker
BBL Premiers pas avec Docker
 
KubeCon EU 2016: Kubernetes and the Potential for Higher Level Interfaces
KubeCon EU 2016: Kubernetes and the Potential for Higher Level InterfacesKubeCon EU 2016: Kubernetes and the Potential for Higher Level Interfaces
KubeCon EU 2016: Kubernetes and the Potential for Higher Level Interfaces
 
Encode x NEAR: Technical Overview of NEAR 1
Encode x NEAR: Technical Overview of NEAR 1Encode x NEAR: Technical Overview of NEAR 1
Encode x NEAR: Technical Overview of NEAR 1
 
Observability
ObservabilityObservability
Observability
 

Mehr von Bertrand Delacretaz

VanillaJS & the Web Platform, a match made in heaven?
VanillaJS & the Web Platform, a match made in heaven?VanillaJS & the Web Platform, a match made in heaven?
VanillaJS & the Web Platform, a match made in heaven?Bertrand Delacretaz
 
Surviving large online communities with conciseness and clarity
Surviving large online communities with conciseness and clarity Surviving large online communities with conciseness and clarity
Surviving large online communities with conciseness and clarity Bertrand Delacretaz
 
The Moving House Model, adhocracy and remote collaboration
The Moving House Model, adhocracy and remote collaborationThe Moving House Model, adhocracy and remote collaboration
The Moving House Model, adhocracy and remote collaborationBertrand Delacretaz
 
GraphQL in Apache Sling - but isn't it the opposite of REST?
GraphQL in Apache Sling - but isn't it the opposite of REST?GraphQL in Apache Sling - but isn't it the opposite of REST?
GraphQL in Apache Sling - but isn't it the opposite of REST?Bertrand Delacretaz
 
How to convince your left brain (or manager) to follow the Open Source path t...
How to convince your left brain (or manager) to follow the Open Source path t...How to convince your left brain (or manager) to follow the Open Source path t...
How to convince your left brain (or manager) to follow the Open Source path t...Bertrand Delacretaz
 
L'Open Source change le Monde - BlendWebMix 2019
L'Open Source change le Monde - BlendWebMix 2019L'Open Source change le Monde - BlendWebMix 2019
L'Open Source change le Monde - BlendWebMix 2019Bertrand Delacretaz
 
Shared Neurons - the Secret Sauce of Open Source communities?
Shared Neurons - the Secret Sauce of Open Source communities?Shared Neurons - the Secret Sauce of Open Source communities?
Shared Neurons - the Secret Sauce of Open Source communities?Bertrand Delacretaz
 
Sling and Serverless, Best Friends Forever?
Sling and Serverless, Best Friends Forever?Sling and Serverless, Best Friends Forever?
Sling and Serverless, Best Friends Forever?Bertrand Delacretaz
 
Serverless - introduction et perspectives concrètes
Serverless - introduction et perspectives concrètesServerless - introduction et perspectives concrètes
Serverless - introduction et perspectives concrètesBertrand Delacretaz
 
State of the Feather - ApacheCon North America 2018
State of the Feather - ApacheCon North America 2018State of the Feather - ApacheCon North America 2018
State of the Feather - ApacheCon North America 2018Bertrand Delacretaz
 
Karate, the black belt of HTTP API testing?
Karate, the black belt of HTTP API testing?Karate, the black belt of HTTP API testing?
Karate, the black belt of HTTP API testing?Bertrand Delacretaz
 
Open Source at Scale: the Apache Software Foundation (2018)
Open Source at Scale: the Apache Software Foundation (2018)Open Source at Scale: the Apache Software Foundation (2018)
Open Source at Scale: the Apache Software Foundation (2018)Bertrand Delacretaz
 
They don't understand me! Tales from the multi-cultural trenches
They don't understand me! Tales from the multi-cultural trenchesThey don't understand me! Tales from the multi-cultural trenches
They don't understand me! Tales from the multi-cultural trenchesBertrand Delacretaz
 
Prise de Décisions Asynchrone, Devoxx France 2018 (avec vidéo)
Prise de Décisions Asynchrone, Devoxx France 2018 (avec vidéo)Prise de Décisions Asynchrone, Devoxx France 2018 (avec vidéo)
Prise de Décisions Asynchrone, Devoxx France 2018 (avec vidéo)Bertrand Delacretaz
 
Project and Community Services the Apache Way
Project and Community Services the Apache WayProject and Community Services the Apache Way
Project and Community Services the Apache WayBertrand Delacretaz
 
La Fondation Apache - keynote au Paris Open Source Summit 2017
La Fondation Apache - keynote au Paris Open Source Summit 2017La Fondation Apache - keynote au Paris Open Source Summit 2017
La Fondation Apache - keynote au Paris Open Source Summit 2017Bertrand Delacretaz
 
Asynchronous Decision Making - FOSS Backstage 2017
Asynchronous Decision Making - FOSS Backstage 2017Asynchronous Decision Making - FOSS Backstage 2017
Asynchronous Decision Making - FOSS Backstage 2017Bertrand Delacretaz
 
Building an Apache Sling Rendering Farm
Building an Apache Sling Rendering FarmBuilding an Apache Sling Rendering Farm
Building an Apache Sling Rendering FarmBertrand Delacretaz
 
Who needs meetings? Asynchronous Decision Making to the rescue
Who needs meetings? Asynchronous Decision Making to the rescueWho needs meetings? Asynchronous Decision Making to the rescue
Who needs meetings? Asynchronous Decision Making to the rescueBertrand Delacretaz
 

Mehr von Bertrand Delacretaz (20)

VanillaJS & the Web Platform, a match made in heaven?
VanillaJS & the Web Platform, a match made in heaven?VanillaJS & the Web Platform, a match made in heaven?
VanillaJS & the Web Platform, a match made in heaven?
 
Surviving large online communities with conciseness and clarity
Surviving large online communities with conciseness and clarity Surviving large online communities with conciseness and clarity
Surviving large online communities with conciseness and clarity
 
The Moving House Model, adhocracy and remote collaboration
The Moving House Model, adhocracy and remote collaborationThe Moving House Model, adhocracy and remote collaboration
The Moving House Model, adhocracy and remote collaboration
 
GraphQL in Apache Sling - but isn't it the opposite of REST?
GraphQL in Apache Sling - but isn't it the opposite of REST?GraphQL in Apache Sling - but isn't it the opposite of REST?
GraphQL in Apache Sling - but isn't it the opposite of REST?
 
Open Source Changes the World!
Open Source Changes the World!Open Source Changes the World!
Open Source Changes the World!
 
How to convince your left brain (or manager) to follow the Open Source path t...
How to convince your left brain (or manager) to follow the Open Source path t...How to convince your left brain (or manager) to follow the Open Source path t...
How to convince your left brain (or manager) to follow the Open Source path t...
 
L'Open Source change le Monde - BlendWebMix 2019
L'Open Source change le Monde - BlendWebMix 2019L'Open Source change le Monde - BlendWebMix 2019
L'Open Source change le Monde - BlendWebMix 2019
 
Shared Neurons - the Secret Sauce of Open Source communities?
Shared Neurons - the Secret Sauce of Open Source communities?Shared Neurons - the Secret Sauce of Open Source communities?
Shared Neurons - the Secret Sauce of Open Source communities?
 
Sling and Serverless, Best Friends Forever?
Sling and Serverless, Best Friends Forever?Sling and Serverless, Best Friends Forever?
Sling and Serverless, Best Friends Forever?
 
Serverless - introduction et perspectives concrètes
Serverless - introduction et perspectives concrètesServerless - introduction et perspectives concrètes
Serverless - introduction et perspectives concrètes
 
State of the Feather - ApacheCon North America 2018
State of the Feather - ApacheCon North America 2018State of the Feather - ApacheCon North America 2018
State of the Feather - ApacheCon North America 2018
 
Karate, the black belt of HTTP API testing?
Karate, the black belt of HTTP API testing?Karate, the black belt of HTTP API testing?
Karate, the black belt of HTTP API testing?
 
Open Source at Scale: the Apache Software Foundation (2018)
Open Source at Scale: the Apache Software Foundation (2018)Open Source at Scale: the Apache Software Foundation (2018)
Open Source at Scale: the Apache Software Foundation (2018)
 
They don't understand me! Tales from the multi-cultural trenches
They don't understand me! Tales from the multi-cultural trenchesThey don't understand me! Tales from the multi-cultural trenches
They don't understand me! Tales from the multi-cultural trenches
 
Prise de Décisions Asynchrone, Devoxx France 2018 (avec vidéo)
Prise de Décisions Asynchrone, Devoxx France 2018 (avec vidéo)Prise de Décisions Asynchrone, Devoxx France 2018 (avec vidéo)
Prise de Décisions Asynchrone, Devoxx France 2018 (avec vidéo)
 
Project and Community Services the Apache Way
Project and Community Services the Apache WayProject and Community Services the Apache Way
Project and Community Services the Apache Way
 
La Fondation Apache - keynote au Paris Open Source Summit 2017
La Fondation Apache - keynote au Paris Open Source Summit 2017La Fondation Apache - keynote au Paris Open Source Summit 2017
La Fondation Apache - keynote au Paris Open Source Summit 2017
 
Asynchronous Decision Making - FOSS Backstage 2017
Asynchronous Decision Making - FOSS Backstage 2017Asynchronous Decision Making - FOSS Backstage 2017
Asynchronous Decision Making - FOSS Backstage 2017
 
Building an Apache Sling Rendering Farm
Building an Apache Sling Rendering FarmBuilding an Apache Sling Rendering Farm
Building an Apache Sling Rendering Farm
 
Who needs meetings? Asynchronous Decision Making to the rescue
Who needs meetings? Asynchronous Decision Making to the rescueWho needs meetings? Asynchronous Decision Making to the rescue
Who needs meetings? Asynchronous Decision Making to the rescue
 

Kürzlich hochgeladen

Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready ...Nanded City ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...tanu pandey
 
Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated  Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...Top Rated  Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...Call Girls in Nagpur High Profile
 
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl ServiceRussian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl Servicegwenoracqe6
 
Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.soniya singh
 
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service AvailableCall Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service AvailableSeo
 
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663Call Girls Mumbai
 
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebGDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebJames Anderson
 
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...Diya Sharma
 
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024APNIC
 
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...Neha Pandey
 
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...tanu pandey
 
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...SofiyaSharma5
 
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445ruhi
 
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRLLucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRLimonikaupta
 
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 

Kürzlich hochgeladen (20)

Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
 
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready ...Nanded City ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...
 
Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated  Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...Top Rated  Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
 
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl ServiceRussian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
 
Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.
 
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service AvailableCall Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
 
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
 
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebGDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
 
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
 
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
 
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
 
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
 
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
 
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
 
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
 
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
 
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRLLucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
 
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
 
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 

Repoinit: a mini-language for content repository initialization

  • 1. EUROPE'S LEADING AEM DEVELOPER CONFERENCE 27th – 29th SEPTEMBER 2021 Images: stock.adobe.com, unless otherwise specified - slides revision: 2021-09-29 
 a mini-language for content repository initialization repoinit Bertrand Delacrétaz - Adobe & Apache - @bdelacretaz - grep.codeconsult.ch
  • 2. Apache Sling repoinit - Bertrand Delacrétaz, Adobe - September 2021 2 what's repoinit? how to use it? how to write a parser? test-driven software?
  • 3. Apache Sling repoinit - Bertrand Delacrétaz, Adobe - September 2021 3 a "boots in the mud" talk, for once
  • 5. Apache Sling repoinit - Bertrand Delacrétaz, Adobe - September 2021 5 repoinit? https://sling.apache.org/documentation/bundles/repository-initialization.html JCR startup SlingRepositoryInitializers repoinit scripts register SlingRepository successful? set ACL on /libs,/app s allow jcr:read for alice, bo b allow jcr:all for content-admin s end An Apache Sling mini-language for content repository initialization
  • 6. Apache Sling repoinit - Bertrand Delacrétaz, Adobe - September 2021 6 Quick, set it up before they see it! https://sling.apache.org/documentation/bundles/repository-initialization.html
  • 8. Apache Sling repoinit - Bertrand Delacrétaz, Adobe - September 2021 8 history "We need to initialize a number of things when starting Sling on a new or existing content repository" 
 January 2016 https://issues.apache.org/jira/browse/SLING-5449 
 (great) discussion: https://s.apache.org/repoinit-2016 syntax idea: https://issues.apache.org/jira/browse/JCRVLT-61- credits to Tobias Bocanegra
  • 10. Apache Sling repoinit - Bertrand Delacrétaz, Adobe - September 2021 10 usage JCR startup SlingRepositoryInitializers repoinit scripts register SlingRepository successful? runs at startup if not, fail LOUDLY: no content repository ! script sources: 
 OSGi Feature Model 
 OSGI configs URLs
  • 11. Apache Sling repoinit - Bertrand Delacrétaz, Adobe - September 2021 11 also: explicit parsing and execution If needed for specific 
 use cases..
  • 13. PACKED examples section ahead feel free to ask questions!
  • 14. Apache Sling repoinit - Bertrand Delacrétaz, Adobe - September 2021 14 la doc! la doc! https://sling.apache.org/documentation/ 
 bundles/repository-initialization.html
  • 15. Apache Sling repoinit - Bertrand Delacrétaz, Adobe - September 2021 15 create paths and set properties create path /one/two/thre e create path (sling:Folder) /var/disc(nt:unstructured)/afolde r create path /five(mixin nt:art)/step(mixin nt:dance)/two/steps
 
 set properties on /pathA, /path/ B set sling:ResourceType{String} to /x/y/ z default someLong{Long} to 4 2 set someFlag{Boolean} to tru e default someDate{Date} to "2020-03-19T11:39:33.437+05:30 " set customMultiValueStringProp to test1, test 2 en d
  • 16. Apache Sling repoinit - Bertrand Delacrétaz, Adobe - September 2021 16 manage (service) users create service user bob,alice, tom2 1 create service user leo with path /some/absolute/pat h delete service user Leonardo,Winston_3 2 disable service user svcA : "This explains why it's disabled " create user AF with forced path /path/user/A F create user userC with password plain_text_only_for_testin g delete user userC
  • 17. Apache Sling repoinit - Bertrand Delacrétaz, Adobe - September 2021 17 groups create group group a create group groupb with path /thePath F create group groupc with forced path /thePath G add user1,user2 to group group D remove user3,user5 from group group E delete group group a set properties on authorizable(groupD ) set stringProp to "hello, group D " en d set properties on authorizable(user3)/neste d set stringProp to "hello, nested! " en d
  • 18. Apache Sling repoinit - Bertrand Delacrétaz, Adobe - September 2021 18 Access Control Lists (ACL) set principal ACL for principal1,principal 2 allow jcr:all on /conten t allow jcr:namespaceManagement on :repository deny jcr:write on /var/secret s remove * on /libs,/app s en d set ACL on home(jack),/tmp/ a allow jcr:read for alic e deny jcr:read for user2 restriction(rep:itemNames,p1,p2 ) en d delete ACL on /conten t delete principal ACL for ada, am y
  • 19. Apache Sling repoinit - Bertrand Delacrétaz, Adobe - September 2021 19 Interlude: how big? how fast? Test script at https://gist.github.com/bdelacretaz/5ece181782206c0c9f820a78e6baaeef With limit = 5000: 
 (20000 repoinit operations) Parsing: 127 msec Execution: 23868 msec About 1000 ops / second 
 on my 2018 macbook pro 
 on a local Sling Starter instance for i in 1 to $LIMIT 
 do 
 create service user LU-$i 
 create path /tmp/repoinit-three/mod-1/lu-$i 
 set ACL for LU-$i 
 allow jcr:all on /tmp/repoinit-three/mod-1/lu-$i 
 end 
 set ACL on /tmp/repoinit-three/mod-1/lu-$i 
 deny jcr:read for everyone 
 end done Session.save() RepoInitParser Test Script JcrRepoInitOpsProcessor
  • 20. Apache Sling repoinit - Bertrand Delacrétaz, Adobe - September 2021 20 JCR node types and namespaces register nodetypes <<== = <slingevent='http://sling.apache.org/jcr/event/1.0' > <nt='http://www.jcp.org/jcr/nt/1.0' > <mix='http://www.jcp.org/jcr/mix/1.0' > [slingevent:Event] > nt:unstructured, nt:hierarchyNod e - slingevent:topic (string ) - slingevent:application (string ) ===> > register namespace (testing) uri:some-uri/V/1. 0
  • 21. Apache Sling repoinit - Bertrand Delacrétaz, Adobe - September 2021 21 privileges register privilege simplePriv A register privilege ns:simplePriv B register abstract privilege abstract A register abstract privilege ns:abstract B
  • 22. Apache Sling repoinit - Bertrand Delacrétaz, Adobe - September 2021 22 summary create path, set properties, default value s create (service) user, delete, disabl e create group, add/remove users, delet e set ACL on paths or for principals, remove * register JCR node types and namespaces register privileges
  • 23. Apache Sling repoinit - Bertrand Delacrétaz, Adobe - September 2021 23 repoinit vs content packages? repoinit: diffable tracable evolution failures prevent startup 
 (good for critical setup) repoinit for repository setup, 
 content packages for actual content? WDYT? content packages: complex content structures project modularization
  • 26. please 
 DO NOT write parsers BY HAND unless you know EXACTLY what you are doing
  • 27. Apache Sling repoinit - Bertrand Delacrétaz, Adobe - September 2021 27 see also: https://javacc.org and 
 https://notes.eatonphil.com/parser-generators-vs-handwritten-parsers-survey-2021.html please 
 DO NOT write parsers BY HAND unless you know EXACTLY what you are doing The repoinit parser code is maintainable testable understandable Thanks to the use of a parser generator (JavaCC) void deleteAclPrincipals(List<Operation> result) : { <DELETE> <ACL> <FOR> p = principalsList( ) ( <EOL> | <EOF> ) { result.add(new DeleteAclPrincipals(p)) ; } }
  • 29. Apache Sling repoinit - Bertrand Delacrétaz, Adobe - September 2021 29 test-driven software 31 commented test scenarios 
 drive the design, implementation and documentation (text files, input + expected output) https://sling.apache.org/documentation/bundles/repository-initialization.html concatenate
  • 30. coda
  • 31. Apache Sling repoinit - Bertrand Delacrétaz, Adobe - September 2021 31 repoinit! reliable repository initialization I'm @bdelacretaz , thanks for watching! more at https://sling.apache.org/documentation/bundles/repository-initialization.html on parsing: https://pinboard.in/u:bdelacretaz/t:parsing/ ongoing improvements robust software JCR startup SlingRepositoryInitializers repoinit scripts register SlingRepository successful? set ACL on home(jack),/tmp/ a allow jcr:read for alic e deny jcr:read for bo b end clean syntax