SlideShare une entreprise Scribd logo
1  sur  28
Télécharger pour lire hors ligne
Docker Init
Before and After
Wednesday, 4 October 2023, 11:15 - 12:00
Angel Borroy
Developer Advocate | Hyland
2
Angel Borroy /Ann-Hell Borrow/
Passionate advocate for Open-Source software, actively contributing to
projects like Alfresco, Nuxeo and Hyland Experience. Angel is a Docker
Compose groupie and has been involved with Docker Community as
Docker Chapter Leader in Spain for years. Additionally, he teaches
Cryptography in the University, bridging the container gap between
academia and industry.
● Twitter https://twitter.com/AngelBorroy
● LinkedIn https://www.linkedin.com/in/angelborroy/
● GitHub https://github.com/aborroy
● Docker Hub https://hub.docker.com/u/angelborroy
Tools
EXPERIENCE
https://www.fotor.com/images/create
3
A Matter of Assets
How to create Docker Assets that follow best
practices using a common approach for
Developers, DevOps engineers and Users?
4
BEFORE
Python | Yeoman | Docker
DOCKER INIT
Defaults | Available Templates
AFTER
Community Templates | Wish List
01 BEFORE
6
Our Use Case
01 Before
$ docker run --rm -it -v ${PWD}:/input pmsipilot/docker-compose-viz render -m image compose.yaml --output-file=alfresco.png --force
Owned
Default
Open Source product development
• Well-sized services
• Releases
• Configuration
• Extension
7
Release
Release
Release
Release
Release
Release
Release
Release
There are Countless Choices!
01 Before
Release Config
Protocol
Service
DB
Extension
Release
Release
Release
Release
Release
Release
Product
Community
Dev
8
Follow the Yellow Brick Road
01 Before
PIPELINEABLE USER INTERACTION FRICTIONLESS
Python
Generate Docker Compose templates
via command line inputs, tailored for
testing within software pipelines.
Yeoman
Generate Docker Compose
templates via command line inputs
or interactive prompts, designed for
local development and testing.
Docker
Yeoman program wrapper for
simplified execution and minimizing
software requirements.
9
Python
Python
PyYAML
• Designed to be used as part of the testing pipeline for Search Services
• Producing a set of Docker Compose templates with different configuration options
Template
Variables & Marks replacement
build:
context: ./${SOLR_HOST}
environment:
SOLR_ALFRESCO_PORT: "${ALFRESCO_PORT}"
JAVA_OPTS: "Populated by the generator script"
ports:
- ${EXTERNAL_PORT}:8983
01 Before
python-generator
PIPELINEABLE
USER INTERACTION
FRICTIONLESS
10
Python
Execution
Command line invocation with parameters
$ python generator.py 
--alfresco=alfresco/alfresco-content-repository:6.2.0 
--transformer=AIOTransformers
$ tree
.
├── alfresco
│ └── Dockerfile
├── docker-compose.yml
└── search
└── Dockerfile
01 Before
python-generator
PIPELINEABLE
USER INTERACTION
FRICTIONLESS
11
Yeoman
01 Before
alfresco-docker-installer
PIPELINEABLE
USER INTERACTION
FRICTIONLESS
Yeoman
npm Node.js
• Designed to be used for local development and testing using the full stack
• Producing a set of Docker Compose templates with different configuration options
Template
Variables replacement and conditional blocks
build:
context: ./search
environment:
SOLR_ALFRESCO_PORT:
<% if (solrHttpMode == 'https') { %> "8443" <% } else { %> "8080" <% } %>
JAVA_OPTS: -Dalfresco_user_store.adminpassword=<%=password%>
ports:
- <%=solrPort%>:8983
12
Yeoman
01 Before
alfresco-docker-installer
PIPELINEABLE
USER INTERACTION
FRICTIONLESS
Execution
Command line invocation with parameters
$ yo alfresco-docker-installer --acsVersion=6.2 --enableContentIndexing=true
Command line invocation with interactive prompts
$ yo alfresco-docker-installer
Which ACS version do you want to use? (Use arrow keys)
7.3
❯ 7.4
How may GB RAM be available for Alfresco (16 is minimum required)? (16)
Do you want to use HTTPs for Web Proxy? (y/N)
Select the addons to be installed:
◯ Google Docs 3.1.0
❯◉ JavaScript Console 0.7
◉ Order of the Bee Support Tools 1.2.0.0
SELECT
VALUE
BOOLEAN
MULTIPLE CHOICE
13
Yeoman
01 Before
alfresco-enterprise-docker
PIPELINEABLE
USER INTERACTION
FRICTIONLESS
Yeoman
npm Node.js
Template
Hand-made Include Directive
# search-service
activemq:
image: alfresco/alfresco-activemq:${ACTIVEMQ_TAG}
# ui
# transform-service
search-service:
image: alfresco/alfresco-search-services:${SEARCH_TAG}
environment:
SOLR_ALFRESCO_HOST: "alfresco"
SOLR_ALFRESCO_PORT: "8080"
SOLR_SOLR_HOST: "solr6"
SOLR_SOLR_PORT: "8983"
compose.yaml
search-service.yaml
14
Docker
01 Before
alfresco-installer
PIPELINEABLE
USER INTERACTION
FRICTIONLESS
Docker
• Designed to minimize software requirements
Template
Variables replacement and conditional blocks
Execution
Command line invocation with interactive prompts
$ docker run -it -v $(pwd):/generated angelborroy/alfresco-installer
Which ACS version do you want to use? (Use arrow keys)
7.3
❯ 7.4
How may GB RAM be available for Alfresco (16 is minimum required)? (16)
Do you want to use HTTPs for Web Proxy? (y/N)
Select the addons to be installed:
◯ Google Docs 3.1.0
❯◉ JavaScript Console 0.7
◉ Order of the Bee Support Tools 1.2.0.0
Demo Time
02DOCKER INIT
17
docker init
02 Docker Init
Available from Docker Desktop 4.18
This utility will walk you through creating the following files with defaults for your project:
- .dockerignore
- Dockerfile
- compose.yaml
? What application platform does your project use? [Use arrows to move, type to filter]
Go - suitable for a Go server application
Python - suitable for a Python server application
Node - suitable for a Node server application
Rust - suitable for a Rust server application
ASP.NET - suitable for an ASP.NET application
> Other - general purpose starting point for containerizing your application
Don't see something you need? Let us know!
18
docker init
02 Docker Init
Official documentation
Closed source code
Docker Roadmap
PIPELINEABLE
FRICTIONLESS
USER INTERACTION
Demo Time
03AFTER
21
Docker Init (with Templates!)
03 After
Sample Go implementation providing:
• CLI Interaction with Cobra
• Prompts Definition with YAML
• Assets Templating with Go template
• Expression Evaluation with bexpr
CLI interaction
docker init [flags]
Generates Docker Assets from a given template
Flags:
-t, --template string Name of the template to be used
-p, --prompt stringArray Property=Value list containing prompt values
-d, --directory string Local Directory containing templates to be used
-o, --output string Local Directory to write produced files
-h, --help help for init
>> Every prompt value can be used as parameter with the –p flag
PIPELINEABLE
USER INTERACTION
LOW FRICTION
docker-init-with-templates
22
Docker Init (with Templates!)
03 After
CLI interaction
docker init catalog [flags]
Provides information relative to the Templates Catalog
Flags:
-t, --template string Name of the template to get details
-d, --directory string Local Directory containing templates to be used
-h, --help help for catalog
docker-init-with-templates
templates
alfresco
templates
nginx-golang-db
DOCKER CLI
Version:
label: Which ACS version do you want to use?
options:
- 7.3
- 7.4
Database:
label: Which Database engine do you want to use?
options:
- postgres
- mariadb
Messaging:
label: Do you want to use the Events service?
options:
- Yes
- No
Addons:
label: Select the addons to be installed
multiple: true
options:
- Order of the Bee Support Tools
- OCR Transformer
- Share Site Creators
Server:
label: What is the name of your server?
default: localhost
prompts.yaml
23
Docker Init (with Templates!)
03 After
Template Definition
• Folder under “templates” directory with the name of the template (like “alfresco”)
• prompts.yaml file including prompts specification
• Assets to be processed using .tpl extension
templates
└── nginx-golang-db
├── README.md.tpl
├── backend
│ ├── Dockerfile.tpl
│ ├── go.mod.tpl
│ ├── go.sum.tpl
│ └── main.go.tpl
├── compose.yaml.tpl
├── db
│ └── password.txt.tpl
├── prompts.yaml
└── proxy
└── nginx.conf.tpl
docker-init-with-templates
Template name >> nginx-golang-db
Usage >> README.md
Docker Image >> Dockerfile
Source code >> main.go
Docker Compose >> compose.yaml
Prompts definition
Nice!
24
Docker Init (with Templates!)
03 After
Prompts Definition
docker-init-with-templates
<id>
label: <label>
[options | default]: ...
condition: <value>
multiple: true | false
password: true | false
SELECT
PASSWORD
BOOLEAN
MULTIPLE CHOICE
VALUE
prompts.yaml
Volumes:
label: Volume method?
options:
- None
- Native
- Bind
ServerName:
label: Name of server?
default: localhost
DbPassword:
label: Type your password
password: true
Addons:
label: Addons to install
multiple: true
options:
- OCR
- Order of the Bee
Messaging:
label: Use messages?
options:
- Yes
- No
https://github.com/AlecAivazis/survey
25
Docker Init (with Templates!)
03 After
Assets Templating
• Use .tpl extension
• Use expressions with values from prompts following text/template syntax
• If a template is parsed to an empty file, the file is excluded from output folder
Conditional blocks
{{- if eq .LegacyUI "Yes"}}
- ./legacy-ui/compose.yaml
{{- end}}
Values from prompts
environment:
ACTIVEMQ_ADMIN_LOGIN: "{{.MessagingUser}}"
ACTIVEMQ_ADMIN_PASSWORD: "{{.MessagingPassword}}"
docker-init-with-templates
http://networkbit.ch/golang-text-template/
Demo Time
27
What about you?
Make some noise!
Raise your requirements for Docker Init command:
https://github.com/docker/cli/issues
THANK YOU

Contenu connexe

Similaire à Before & After Docker Init

Accelerate your software development with Docker
Accelerate your software development with DockerAccelerate your software development with Docker
Accelerate your software development with DockerAndrey Hristov
 
Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...
Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...
Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...Patrick Chanezon
 
Dockerizing a Symfony2 application
Dockerizing a Symfony2 applicationDockerizing a Symfony2 application
Dockerizing a Symfony2 applicationRoman Rodomansky
 
Real World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and ProductionReal World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and ProductionBen Hall
 
[Codelab 2017] Docker 기초 및 활용 방안
[Codelab 2017] Docker 기초 및 활용 방안[Codelab 2017] Docker 기초 및 활용 방안
[Codelab 2017] Docker 기초 및 활용 방안양재동 코드랩
 
BBL Premiers pas avec Docker
BBL Premiers pas avec DockerBBL Premiers pas avec Docker
BBL Premiers pas avec Dockerkanedafromparis
 
Docker for developers on mac and windows
Docker for developers on mac and windowsDocker for developers on mac and windows
Docker for developers on mac and windowsDocker, Inc.
 
Docker: A New Way to Turbocharging Your Apps Development
Docker: A New Way to Turbocharging Your Apps DevelopmentDocker: A New Way to Turbocharging Your Apps Development
Docker: A New Way to Turbocharging Your Apps Developmentmsyukor
 
Docker Container As A Service - Mix-IT 2016
Docker Container As A Service - Mix-IT 2016Docker Container As A Service - Mix-IT 2016
Docker Container As A Service - Mix-IT 2016Patrick Chanezon
 
Faster and Easier Software Development using Docker Platform
Faster and Easier Software Development using Docker PlatformFaster and Easier Software Development using Docker Platform
Faster and Easier Software Development using Docker Platformmsyukor
 
DCEU 18: Developing with Docker Containers
DCEU 18: Developing with Docker ContainersDCEU 18: Developing with Docker Containers
DCEU 18: Developing with Docker ContainersDocker, Inc.
 
Docker Basics & Alfresco Content Services
Docker Basics & Alfresco Content ServicesDocker Basics & Alfresco Content Services
Docker Basics & Alfresco Content ServicesSujay Pillai
 
Scaling docker with kubernetes
Scaling docker with kubernetesScaling docker with kubernetes
Scaling docker with kubernetesLiran Cohen
 
Getting Started with Docker
Getting Started with DockerGetting Started with Docker
Getting Started with DockerGeeta Vinnakota
 
What's New in Docker - February 2017
What's New in Docker - February 2017What's New in Docker - February 2017
What's New in Docker - February 2017Patrick Chanezon
 
Automate drupal deployments with linux containers, docker and vagrant
Automate drupal deployments with linux containers, docker and vagrant Automate drupal deployments with linux containers, docker and vagrant
Automate drupal deployments with linux containers, docker and vagrant Ricardo Amaro
 
Using Docker For Development
Using Docker For DevelopmentUsing Docker For Development
Using Docker For DevelopmentLaura Frank Tacho
 
Powercoders · Docker · Fall 2021.pptx
Powercoders · Docker · Fall 2021.pptxPowercoders · Docker · Fall 2021.pptx
Powercoders · Docker · Fall 2021.pptxIgnacioTamayo2
 

Similaire à Before & After Docker Init (20)

Accelerate your software development with Docker
Accelerate your software development with DockerAccelerate your software development with Docker
Accelerate your software development with Docker
 
Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...
Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...
Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...
 
Dockerizing a Symfony2 application
Dockerizing a Symfony2 applicationDockerizing a Symfony2 application
Dockerizing a Symfony2 application
 
Real World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and ProductionReal World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and Production
 
[Codelab 2017] Docker 기초 및 활용 방안
[Codelab 2017] Docker 기초 및 활용 방안[Codelab 2017] Docker 기초 및 활용 방안
[Codelab 2017] Docker 기초 및 활용 방안
 
BBL Premiers pas avec Docker
BBL Premiers pas avec DockerBBL Premiers pas avec Docker
BBL Premiers pas avec Docker
 
Docker for developers on mac and windows
Docker for developers on mac and windowsDocker for developers on mac and windows
Docker for developers on mac and windows
 
Docker for Developers
Docker for DevelopersDocker for Developers
Docker for Developers
 
Docker: A New Way to Turbocharging Your Apps Development
Docker: A New Way to Turbocharging Your Apps DevelopmentDocker: A New Way to Turbocharging Your Apps Development
Docker: A New Way to Turbocharging Your Apps Development
 
Docker Container As A Service - Mix-IT 2016
Docker Container As A Service - Mix-IT 2016Docker Container As A Service - Mix-IT 2016
Docker Container As A Service - Mix-IT 2016
 
Faster and Easier Software Development using Docker Platform
Faster and Easier Software Development using Docker PlatformFaster and Easier Software Development using Docker Platform
Faster and Easier Software Development using Docker Platform
 
DCEU 18: Developing with Docker Containers
DCEU 18: Developing with Docker ContainersDCEU 18: Developing with Docker Containers
DCEU 18: Developing with Docker Containers
 
Docker Basics & Alfresco Content Services
Docker Basics & Alfresco Content ServicesDocker Basics & Alfresco Content Services
Docker Basics & Alfresco Content Services
 
Docker, but what it is?
Docker, but what it is?Docker, but what it is?
Docker, but what it is?
 
Scaling docker with kubernetes
Scaling docker with kubernetesScaling docker with kubernetes
Scaling docker with kubernetes
 
Getting Started with Docker
Getting Started with DockerGetting Started with Docker
Getting Started with Docker
 
What's New in Docker - February 2017
What's New in Docker - February 2017What's New in Docker - February 2017
What's New in Docker - February 2017
 
Automate drupal deployments with linux containers, docker and vagrant
Automate drupal deployments with linux containers, docker and vagrant Automate drupal deployments with linux containers, docker and vagrant
Automate drupal deployments with linux containers, docker and vagrant
 
Using Docker For Development
Using Docker For DevelopmentUsing Docker For Development
Using Docker For Development
 
Powercoders · Docker · Fall 2021.pptx
Powercoders · Docker · Fall 2021.pptxPowercoders · Docker · Fall 2021.pptx
Powercoders · Docker · Fall 2021.pptx
 

Plus de Angel Borroy López

Transitioning from Customized Solr to Out-of-the-Box OpenSearch
Transitioning from Customized Solr to Out-of-the-Box OpenSearchTransitioning from Customized Solr to Out-of-the-Box OpenSearch
Transitioning from Customized Solr to Out-of-the-Box OpenSearchAngel Borroy López
 
Alfresco integration with OpenSearch - OpenSearchCon 2024 Europe
Alfresco integration with OpenSearch - OpenSearchCon 2024 EuropeAlfresco integration with OpenSearch - OpenSearchCon 2024 Europe
Alfresco integration with OpenSearch - OpenSearchCon 2024 EuropeAngel Borroy López
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
Using Generative AI and Content Service Platforms together
Using Generative AI and Content Service Platforms togetherUsing Generative AI and Content Service Platforms together
Using Generative AI and Content Service Platforms togetherAngel Borroy López
 
Enhancing Document-Centric Features with On-Premise Generative AI for Alfresc...
Enhancing Document-Centric Features with On-Premise Generative AI for Alfresc...Enhancing Document-Centric Features with On-Premise Generative AI for Alfresc...
Enhancing Document-Centric Features with On-Premise Generative AI for Alfresc...Angel Borroy López
 
La Guía Definitiva para una Actualización Exitosa a Alfresco 23.1
La Guía Definitiva para una Actualización Exitosa a Alfresco 23.1La Guía Definitiva para una Actualización Exitosa a Alfresco 23.1
La Guía Definitiva para una Actualización Exitosa a Alfresco 23.1Angel Borroy López
 
Alfresco Transform Services 4.0.0
Alfresco Transform Services 4.0.0Alfresco Transform Services 4.0.0
Alfresco Transform Services 4.0.0Angel Borroy López
 
How to migrate from Alfresco Search Services to Alfresco SearchEnterprise
How to migrate from Alfresco Search Services to Alfresco SearchEnterpriseHow to migrate from Alfresco Search Services to Alfresco SearchEnterprise
How to migrate from Alfresco Search Services to Alfresco SearchEnterpriseAngel Borroy López
 
CSP: Evolución de servicios de código abierto en un mundo Cloud Native
CSP: Evolución de servicios de código abierto en un mundo Cloud NativeCSP: Evolución de servicios de código abierto en un mundo Cloud Native
CSP: Evolución de servicios de código abierto en un mundo Cloud NativeAngel Borroy López
 
Alfresco Embedded Activiti Engine
Alfresco Embedded Activiti EngineAlfresco Embedded Activiti Engine
Alfresco Embedded Activiti EngineAngel Borroy López
 
Collaborative Editing Tools for Alfresco
Collaborative Editing Tools for AlfrescoCollaborative Editing Tools for Alfresco
Collaborative Editing Tools for AlfrescoAngel Borroy López
 
Desarrollando una Extensión para Docker
Desarrollando una Extensión para DockerDesarrollando una Extensión para Docker
Desarrollando una Extensión para DockerAngel Borroy López
 
DockerCon 2022 Spanish Room-ONBOARDING.pdf
DockerCon 2022 Spanish Room-ONBOARDING.pdfDockerCon 2022 Spanish Room-ONBOARDING.pdf
DockerCon 2022 Spanish Room-ONBOARDING.pdfAngel Borroy López
 
Deploying Containerised Open-Source CSP Platforms
Deploying Containerised Open-Source CSP PlatformsDeploying Containerised Open-Source CSP Platforms
Deploying Containerised Open-Source CSP PlatformsAngel Borroy López
 
Discovering the 2 in Alfresco Search Services 2.0
Discovering the 2 in Alfresco Search Services 2.0Discovering the 2 in Alfresco Search Services 2.0
Discovering the 2 in Alfresco Search Services 2.0Angel Borroy López
 
(Re)Indexing Large Repositories in Alfresco
(Re)Indexing Large Repositories in Alfresco(Re)Indexing Large Repositories in Alfresco
(Re)Indexing Large Repositories in AlfrescoAngel Borroy López
 

Plus de Angel Borroy López (20)

Transitioning from Customized Solr to Out-of-the-Box OpenSearch
Transitioning from Customized Solr to Out-of-the-Box OpenSearchTransitioning from Customized Solr to Out-of-the-Box OpenSearch
Transitioning from Customized Solr to Out-of-the-Box OpenSearch
 
Alfresco integration with OpenSearch - OpenSearchCon 2024 Europe
Alfresco integration with OpenSearch - OpenSearchCon 2024 EuropeAlfresco integration with OpenSearch - OpenSearchCon 2024 Europe
Alfresco integration with OpenSearch - OpenSearchCon 2024 Europe
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
Using Generative AI and Content Service Platforms together
Using Generative AI and Content Service Platforms togetherUsing Generative AI and Content Service Platforms together
Using Generative AI and Content Service Platforms together
 
Enhancing Document-Centric Features with On-Premise Generative AI for Alfresc...
Enhancing Document-Centric Features with On-Premise Generative AI for Alfresc...Enhancing Document-Centric Features with On-Premise Generative AI for Alfresc...
Enhancing Document-Centric Features with On-Premise Generative AI for Alfresc...
 
La Guía Definitiva para una Actualización Exitosa a Alfresco 23.1
La Guía Definitiva para una Actualización Exitosa a Alfresco 23.1La Guía Definitiva para una Actualización Exitosa a Alfresco 23.1
La Guía Definitiva para una Actualización Exitosa a Alfresco 23.1
 
Alfresco Transform Services 4.0.0
Alfresco Transform Services 4.0.0Alfresco Transform Services 4.0.0
Alfresco Transform Services 4.0.0
 
How to migrate from Alfresco Search Services to Alfresco SearchEnterprise
How to migrate from Alfresco Search Services to Alfresco SearchEnterpriseHow to migrate from Alfresco Search Services to Alfresco SearchEnterprise
How to migrate from Alfresco Search Services to Alfresco SearchEnterprise
 
Using Podman with Alfresco
Using Podman with AlfrescoUsing Podman with Alfresco
Using Podman with Alfresco
 
CSP: Evolución de servicios de código abierto en un mundo Cloud Native
CSP: Evolución de servicios de código abierto en un mundo Cloud NativeCSP: Evolución de servicios de código abierto en un mundo Cloud Native
CSP: Evolución de servicios de código abierto en un mundo Cloud Native
 
Alfresco Embedded Activiti Engine
Alfresco Embedded Activiti EngineAlfresco Embedded Activiti Engine
Alfresco Embedded Activiti Engine
 
Alfresco Transform Core 3.0.0
Alfresco Transform Core 3.0.0Alfresco Transform Core 3.0.0
Alfresco Transform Core 3.0.0
 
Collaborative Editing Tools for Alfresco
Collaborative Editing Tools for AlfrescoCollaborative Editing Tools for Alfresco
Collaborative Editing Tools for Alfresco
 
Desarrollando una Extensión para Docker
Desarrollando una Extensión para DockerDesarrollando una Extensión para Docker
Desarrollando una Extensión para Docker
 
DockerCon 2022 Spanish Room-ONBOARDING.pdf
DockerCon 2022 Spanish Room-ONBOARDING.pdfDockerCon 2022 Spanish Room-ONBOARDING.pdf
DockerCon 2022 Spanish Room-ONBOARDING.pdf
 
Deploying Containerised Open-Source CSP Platforms
Deploying Containerised Open-Source CSP PlatformsDeploying Containerised Open-Source CSP Platforms
Deploying Containerised Open-Source CSP Platforms
 
Introduction to AWS
Introduction to AWSIntroduction to AWS
Introduction to AWS
 
Alfresco Certificates
Alfresco Certificates Alfresco Certificates
Alfresco Certificates
 
Discovering the 2 in Alfresco Search Services 2.0
Discovering the 2 in Alfresco Search Services 2.0Discovering the 2 in Alfresco Search Services 2.0
Discovering the 2 in Alfresco Search Services 2.0
 
(Re)Indexing Large Repositories in Alfresco
(Re)Indexing Large Repositories in Alfresco(Re)Indexing Large Repositories in Alfresco
(Re)Indexing Large Repositories in Alfresco
 

Dernier

architecting-ai-in-the-enterprise-apis-and-applications.pdf
architecting-ai-in-the-enterprise-apis-and-applications.pdfarchitecting-ai-in-the-enterprise-apis-and-applications.pdf
architecting-ai-in-the-enterprise-apis-and-applications.pdfWSO2
 
^Clinic ^%[+27788225528*Abortion Pills For Sale In birch acres
^Clinic ^%[+27788225528*Abortion Pills For Sale In birch acres^Clinic ^%[+27788225528*Abortion Pills For Sale In birch acres
^Clinic ^%[+27788225528*Abortion Pills For Sale In birch acreskasambamuno
 
Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...
Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...
Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...Andrea Goulet
 
Auto Affiliate AI Earns First Commission in 3 Hours..pdf
Auto Affiliate  AI Earns First Commission in 3 Hours..pdfAuto Affiliate  AI Earns First Commission in 3 Hours..pdf
Auto Affiliate AI Earns First Commission in 3 Hours..pdfSelfMade bd
 
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024SimonedeGijt
 
Evolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI EraEvolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI Eraconfluent
 
Transformer Neural Network Use Cases with Links
Transformer Neural Network Use Cases with LinksTransformer Neural Network Use Cases with Links
Transformer Neural Network Use Cases with LinksJinanKordab
 
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...Lisi Hocke
 
Community is Just as Important as Code by Andrea Goulet
Community is Just as Important as Code by Andrea GouletCommunity is Just as Important as Code by Andrea Goulet
Community is Just as Important as Code by Andrea GouletAndrea Goulet
 
BusinessGPT - Security and Governance for Generative AI
BusinessGPT  - Security and Governance for Generative AIBusinessGPT  - Security and Governance for Generative AI
BusinessGPT - Security and Governance for Generative AIAGATSoftware
 
Food Delivery Business App Development Guide 2024
Food Delivery Business App Development Guide 2024Food Delivery Business App Development Guide 2024
Food Delivery Business App Development Guide 2024Chirag Panchal
 
how-to-download-files-safely-from-the-internet.pdf
how-to-download-files-safely-from-the-internet.pdfhow-to-download-files-safely-from-the-internet.pdf
how-to-download-files-safely-from-the-internet.pdfMehmet Akar
 
Microsoft365_Dev_Security_2024_05_16.pdf
Microsoft365_Dev_Security_2024_05_16.pdfMicrosoft365_Dev_Security_2024_05_16.pdf
Microsoft365_Dev_Security_2024_05_16.pdfMarkus Moeller
 
^Clinic ^%[+27788225528*Abortion Pills For Sale In witbank
^Clinic ^%[+27788225528*Abortion Pills For Sale In witbank^Clinic ^%[+27788225528*Abortion Pills For Sale In witbank
^Clinic ^%[+27788225528*Abortion Pills For Sale In witbankkasambamuno
 
OpenChain @ LF Japan Executive Briefing - May 2024
OpenChain @ LF Japan Executive Briefing - May 2024OpenChain @ LF Japan Executive Briefing - May 2024
OpenChain @ LF Japan Executive Briefing - May 2024Shane Coughlan
 
Software Engineering - Introduction + Process Models + Requirements Engineering
Software Engineering - Introduction + Process Models + Requirements EngineeringSoftware Engineering - Introduction + Process Models + Requirements Engineering
Software Engineering - Introduction + Process Models + Requirements EngineeringPrakhyath Rai
 
Automate your OpenSIPS config tests - OpenSIPS Summit 2024
Automate your OpenSIPS config tests - OpenSIPS Summit 2024Automate your OpenSIPS config tests - OpenSIPS Summit 2024
Automate your OpenSIPS config tests - OpenSIPS Summit 2024Andreas Granig
 
Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024Soroosh Khodami
 
Lessons Learned from Building a Serverless Notifications System.pdf
Lessons Learned from Building a Serverless Notifications System.pdfLessons Learned from Building a Serverless Notifications System.pdf
Lessons Learned from Building a Serverless Notifications System.pdfSrushith Repakula
 

Dernier (20)

architecting-ai-in-the-enterprise-apis-and-applications.pdf
architecting-ai-in-the-enterprise-apis-and-applications.pdfarchitecting-ai-in-the-enterprise-apis-and-applications.pdf
architecting-ai-in-the-enterprise-apis-and-applications.pdf
 
^Clinic ^%[+27788225528*Abortion Pills For Sale In birch acres
^Clinic ^%[+27788225528*Abortion Pills For Sale In birch acres^Clinic ^%[+27788225528*Abortion Pills For Sale In birch acres
^Clinic ^%[+27788225528*Abortion Pills For Sale In birch acres
 
Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...
Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...
Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...
 
Auto Affiliate AI Earns First Commission in 3 Hours..pdf
Auto Affiliate  AI Earns First Commission in 3 Hours..pdfAuto Affiliate  AI Earns First Commission in 3 Hours..pdf
Auto Affiliate AI Earns First Commission in 3 Hours..pdf
 
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
 
Evolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI EraEvolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI Era
 
Transformer Neural Network Use Cases with Links
Transformer Neural Network Use Cases with LinksTransformer Neural Network Use Cases with Links
Transformer Neural Network Use Cases with Links
 
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
 
Community is Just as Important as Code by Andrea Goulet
Community is Just as Important as Code by Andrea GouletCommunity is Just as Important as Code by Andrea Goulet
Community is Just as Important as Code by Andrea Goulet
 
BusinessGPT - Security and Governance for Generative AI
BusinessGPT  - Security and Governance for Generative AIBusinessGPT  - Security and Governance for Generative AI
BusinessGPT - Security and Governance for Generative AI
 
Food Delivery Business App Development Guide 2024
Food Delivery Business App Development Guide 2024Food Delivery Business App Development Guide 2024
Food Delivery Business App Development Guide 2024
 
how-to-download-files-safely-from-the-internet.pdf
how-to-download-files-safely-from-the-internet.pdfhow-to-download-files-safely-from-the-internet.pdf
how-to-download-files-safely-from-the-internet.pdf
 
Microsoft365_Dev_Security_2024_05_16.pdf
Microsoft365_Dev_Security_2024_05_16.pdfMicrosoft365_Dev_Security_2024_05_16.pdf
Microsoft365_Dev_Security_2024_05_16.pdf
 
^Clinic ^%[+27788225528*Abortion Pills For Sale In witbank
^Clinic ^%[+27788225528*Abortion Pills For Sale In witbank^Clinic ^%[+27788225528*Abortion Pills For Sale In witbank
^Clinic ^%[+27788225528*Abortion Pills For Sale In witbank
 
OpenChain @ LF Japan Executive Briefing - May 2024
OpenChain @ LF Japan Executive Briefing - May 2024OpenChain @ LF Japan Executive Briefing - May 2024
OpenChain @ LF Japan Executive Briefing - May 2024
 
Software Engineering - Introduction + Process Models + Requirements Engineering
Software Engineering - Introduction + Process Models + Requirements EngineeringSoftware Engineering - Introduction + Process Models + Requirements Engineering
Software Engineering - Introduction + Process Models + Requirements Engineering
 
Automate your OpenSIPS config tests - OpenSIPS Summit 2024
Automate your OpenSIPS config tests - OpenSIPS Summit 2024Automate your OpenSIPS config tests - OpenSIPS Summit 2024
Automate your OpenSIPS config tests - OpenSIPS Summit 2024
 
Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...
Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...
Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...
 
Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024
 
Lessons Learned from Building a Serverless Notifications System.pdf
Lessons Learned from Building a Serverless Notifications System.pdfLessons Learned from Building a Serverless Notifications System.pdf
Lessons Learned from Building a Serverless Notifications System.pdf
 

Before & After Docker Init

  • 1. Docker Init Before and After Wednesday, 4 October 2023, 11:15 - 12:00 Angel Borroy Developer Advocate | Hyland
  • 2. 2 Angel Borroy /Ann-Hell Borrow/ Passionate advocate for Open-Source software, actively contributing to projects like Alfresco, Nuxeo and Hyland Experience. Angel is a Docker Compose groupie and has been involved with Docker Community as Docker Chapter Leader in Spain for years. Additionally, he teaches Cryptography in the University, bridging the container gap between academia and industry. ● Twitter https://twitter.com/AngelBorroy ● LinkedIn https://www.linkedin.com/in/angelborroy/ ● GitHub https://github.com/aborroy ● Docker Hub https://hub.docker.com/u/angelborroy Tools EXPERIENCE https://www.fotor.com/images/create
  • 3. 3 A Matter of Assets How to create Docker Assets that follow best practices using a common approach for Developers, DevOps engineers and Users?
  • 4. 4 BEFORE Python | Yeoman | Docker DOCKER INIT Defaults | Available Templates AFTER Community Templates | Wish List
  • 6. 6 Our Use Case 01 Before $ docker run --rm -it -v ${PWD}:/input pmsipilot/docker-compose-viz render -m image compose.yaml --output-file=alfresco.png --force Owned Default Open Source product development • Well-sized services • Releases • Configuration • Extension
  • 7. 7 Release Release Release Release Release Release Release Release There are Countless Choices! 01 Before Release Config Protocol Service DB Extension Release Release Release Release Release Release Product Community Dev
  • 8. 8 Follow the Yellow Brick Road 01 Before PIPELINEABLE USER INTERACTION FRICTIONLESS Python Generate Docker Compose templates via command line inputs, tailored for testing within software pipelines. Yeoman Generate Docker Compose templates via command line inputs or interactive prompts, designed for local development and testing. Docker Yeoman program wrapper for simplified execution and minimizing software requirements.
  • 9. 9 Python Python PyYAML • Designed to be used as part of the testing pipeline for Search Services • Producing a set of Docker Compose templates with different configuration options Template Variables & Marks replacement build: context: ./${SOLR_HOST} environment: SOLR_ALFRESCO_PORT: "${ALFRESCO_PORT}" JAVA_OPTS: "Populated by the generator script" ports: - ${EXTERNAL_PORT}:8983 01 Before python-generator PIPELINEABLE USER INTERACTION FRICTIONLESS
  • 10. 10 Python Execution Command line invocation with parameters $ python generator.py --alfresco=alfresco/alfresco-content-repository:6.2.0 --transformer=AIOTransformers $ tree . ├── alfresco │ └── Dockerfile ├── docker-compose.yml └── search └── Dockerfile 01 Before python-generator PIPELINEABLE USER INTERACTION FRICTIONLESS
  • 11. 11 Yeoman 01 Before alfresco-docker-installer PIPELINEABLE USER INTERACTION FRICTIONLESS Yeoman npm Node.js • Designed to be used for local development and testing using the full stack • Producing a set of Docker Compose templates with different configuration options Template Variables replacement and conditional blocks build: context: ./search environment: SOLR_ALFRESCO_PORT: <% if (solrHttpMode == 'https') { %> "8443" <% } else { %> "8080" <% } %> JAVA_OPTS: -Dalfresco_user_store.adminpassword=<%=password%> ports: - <%=solrPort%>:8983
  • 12. 12 Yeoman 01 Before alfresco-docker-installer PIPELINEABLE USER INTERACTION FRICTIONLESS Execution Command line invocation with parameters $ yo alfresco-docker-installer --acsVersion=6.2 --enableContentIndexing=true Command line invocation with interactive prompts $ yo alfresco-docker-installer Which ACS version do you want to use? (Use arrow keys) 7.3 ❯ 7.4 How may GB RAM be available for Alfresco (16 is minimum required)? (16) Do you want to use HTTPs for Web Proxy? (y/N) Select the addons to be installed: ◯ Google Docs 3.1.0 ❯◉ JavaScript Console 0.7 ◉ Order of the Bee Support Tools 1.2.0.0 SELECT VALUE BOOLEAN MULTIPLE CHOICE
  • 13. 13 Yeoman 01 Before alfresco-enterprise-docker PIPELINEABLE USER INTERACTION FRICTIONLESS Yeoman npm Node.js Template Hand-made Include Directive # search-service activemq: image: alfresco/alfresco-activemq:${ACTIVEMQ_TAG} # ui # transform-service search-service: image: alfresco/alfresco-search-services:${SEARCH_TAG} environment: SOLR_ALFRESCO_HOST: "alfresco" SOLR_ALFRESCO_PORT: "8080" SOLR_SOLR_HOST: "solr6" SOLR_SOLR_PORT: "8983" compose.yaml search-service.yaml
  • 14. 14 Docker 01 Before alfresco-installer PIPELINEABLE USER INTERACTION FRICTIONLESS Docker • Designed to minimize software requirements Template Variables replacement and conditional blocks Execution Command line invocation with interactive prompts $ docker run -it -v $(pwd):/generated angelborroy/alfresco-installer Which ACS version do you want to use? (Use arrow keys) 7.3 ❯ 7.4 How may GB RAM be available for Alfresco (16 is minimum required)? (16) Do you want to use HTTPs for Web Proxy? (y/N) Select the addons to be installed: ◯ Google Docs 3.1.0 ❯◉ JavaScript Console 0.7 ◉ Order of the Bee Support Tools 1.2.0.0
  • 17. 17 docker init 02 Docker Init Available from Docker Desktop 4.18 This utility will walk you through creating the following files with defaults for your project: - .dockerignore - Dockerfile - compose.yaml ? What application platform does your project use? [Use arrows to move, type to filter] Go - suitable for a Go server application Python - suitable for a Python server application Node - suitable for a Node server application Rust - suitable for a Rust server application ASP.NET - suitable for an ASP.NET application > Other - general purpose starting point for containerizing your application Don't see something you need? Let us know!
  • 18. 18 docker init 02 Docker Init Official documentation Closed source code Docker Roadmap PIPELINEABLE FRICTIONLESS USER INTERACTION
  • 21. 21 Docker Init (with Templates!) 03 After Sample Go implementation providing: • CLI Interaction with Cobra • Prompts Definition with YAML • Assets Templating with Go template • Expression Evaluation with bexpr CLI interaction docker init [flags] Generates Docker Assets from a given template Flags: -t, --template string Name of the template to be used -p, --prompt stringArray Property=Value list containing prompt values -d, --directory string Local Directory containing templates to be used -o, --output string Local Directory to write produced files -h, --help help for init >> Every prompt value can be used as parameter with the –p flag PIPELINEABLE USER INTERACTION LOW FRICTION docker-init-with-templates
  • 22. 22 Docker Init (with Templates!) 03 After CLI interaction docker init catalog [flags] Provides information relative to the Templates Catalog Flags: -t, --template string Name of the template to get details -d, --directory string Local Directory containing templates to be used -h, --help help for catalog docker-init-with-templates templates alfresco templates nginx-golang-db DOCKER CLI Version: label: Which ACS version do you want to use? options: - 7.3 - 7.4 Database: label: Which Database engine do you want to use? options: - postgres - mariadb Messaging: label: Do you want to use the Events service? options: - Yes - No Addons: label: Select the addons to be installed multiple: true options: - Order of the Bee Support Tools - OCR Transformer - Share Site Creators Server: label: What is the name of your server? default: localhost prompts.yaml
  • 23. 23 Docker Init (with Templates!) 03 After Template Definition • Folder under “templates” directory with the name of the template (like “alfresco”) • prompts.yaml file including prompts specification • Assets to be processed using .tpl extension templates └── nginx-golang-db ├── README.md.tpl ├── backend │ ├── Dockerfile.tpl │ ├── go.mod.tpl │ ├── go.sum.tpl │ └── main.go.tpl ├── compose.yaml.tpl ├── db │ └── password.txt.tpl ├── prompts.yaml └── proxy └── nginx.conf.tpl docker-init-with-templates Template name >> nginx-golang-db Usage >> README.md Docker Image >> Dockerfile Source code >> main.go Docker Compose >> compose.yaml Prompts definition Nice!
  • 24. 24 Docker Init (with Templates!) 03 After Prompts Definition docker-init-with-templates <id> label: <label> [options | default]: ... condition: <value> multiple: true | false password: true | false SELECT PASSWORD BOOLEAN MULTIPLE CHOICE VALUE prompts.yaml Volumes: label: Volume method? options: - None - Native - Bind ServerName: label: Name of server? default: localhost DbPassword: label: Type your password password: true Addons: label: Addons to install multiple: true options: - OCR - Order of the Bee Messaging: label: Use messages? options: - Yes - No https://github.com/AlecAivazis/survey
  • 25. 25 Docker Init (with Templates!) 03 After Assets Templating • Use .tpl extension • Use expressions with values from prompts following text/template syntax • If a template is parsed to an empty file, the file is excluded from output folder Conditional blocks {{- if eq .LegacyUI "Yes"}} - ./legacy-ui/compose.yaml {{- end}} Values from prompts environment: ACTIVEMQ_ADMIN_LOGIN: "{{.MessagingUser}}" ACTIVEMQ_ADMIN_PASSWORD: "{{.MessagingPassword}}" docker-init-with-templates http://networkbit.ch/golang-text-template/
  • 27. 27 What about you? Make some noise! Raise your requirements for Docker Init command: https://github.com/docker/cli/issues