SlideShare a Scribd company logo
1 of 21
Download to read offline
© Wärtsilä PUBLIC
Ansible @Wärtsilä
Ansible use cases with legacy application, Siemens Teamcenter
Harri Piili
Solution Architect
Product Engineering & Lifecycle Management Services
Information Management
3.4.2019 [Presentation name / Author]1
CONTEXT
WÄRTSILÄ CORPORATION
OUR PERSONNEL
Approximately 19,000 professionals
In over 200 locations
In more than 80 countries
© Wärtsilä PUBLIC
INFORMATION MANAGEMENT
BUSINESS PRODUCTIVITY
PRODUCT ENGINEERING &
LIFECYCLE MANAGEMENT
SERVICES
PDM/PLM
Product Data Management
Product Lifecycle Management
Main PDM/PLM solutions in
use is Siemens Teamcenter
~1000 users
3.4.2019 [Presentation name / Author]4
Purpose
Via PDM/PLM service Product engineers can have
access to Wärtsilä’s product portfolio at any
location, which allows them to utilize existing
designs and ensure that designs are functional
while using resources more efficiently when
businesses will collaborate over organizational
barriers and share Products and Solutions
information throughout the lifecycle.
© Wärtsilä PUBLIC
BACKGROUND
© Wärtsilä PUBLIC
• We have multiple environments – Production,
PreProduction, QA, ~20 Devs
• Using Ansible for refreshing PreProduction and
QA quarterly as a copy of Production
• Using Ansible for setting up Teamcenter clones
in 6 hours instead of 6 days
• Improved consistency of system
deployments
• Deploying stories and changes to QA and Dev
environments
• Still ramping up the confidence for Prod
deployments
[Presentation name / Author]6
Using Ansible to configure Teamcenter systems
HIGHLIGHTS
3.4.2019
COULD NOT HAVE DONE ALL THIS
WITHOUT A GOOD PARTNER
THANKS EFICODE / HOWARD GUO
© Wärtsilä PUBLIC 3.4.2019 [Presentation name / Author]7
Various use cases
• Copy SQL Server Database from
instance to another
• Copying Teamcenter related binaries to
target servers
• Modifying environment specific
configuration files
• Creating directories, network shares and
controlling accesses
• Running application utilities to configure
system
• Creating OS services
• Installing and configuring IIS and
applications under it
• Deploying related Tomcat services
• Deploying changes via Jenkins using
Ansible
Pretty complicated system to configure and running on Windows
© Wärtsilä PUBLIC 3.4.2019 [Presentation name / Author]8
Prerequisites before starting configuration
• Setting up Ansible authentication using
Kerberos against Windows Active
Directory
• Automating Ansible AWX Environment
setup with Terraform and Ansible at
Amazon EC2
• Authenticating Ansible in BitBucket -
access keys
• Defining Ansible variable strategy
• Setting up AWX inventory from git repo
• Authenticating AWX users to Active
Directory using LDAP
• Patching old Win 2008R2 servers
• Doing investigation spikes
© Wärtsilä PUBLIC
ANSIBLE AWX SETUP
3.4.2019 [Presentation name / Author]9
© Wärtsilä PUBLIC 3.4.2019 [Presentation name / Author]10
Setting up the project
• Started by defining credentials
• Git users, service user, DB users etc.
• AWX automatically keeps these as
secrets
• Defined a project
• Connected to git
• Defined to synchronize automatically
© Wärtsilä PUBLIC 3.4.2019 [Presentation name / Author]11
LDAP Authentication and credentials in AWX
• AWX can authenticate logins
using LDAP
• A new user gets added, when
user logs in
© Wärtsilä PUBLIC 3.4.2019 [Presentation name / Author]12
Inventories
• You can define AWX inventory to be fetched
from various sources, like source control,
cloud provider services, vmware, custom
scripts.
• We chose inventory from project source i.e.
from git
• Each time we create a new Teamcenter
environment, we create a new inventory
subdir in git
• AWX automatically synchronizes the inventory
• Using Ansible in Windows environment
of needs some winrm settings
• ansible_connection: winrm
• ansible_winrm_kerberos_delegation: true
• ansible_winrm_operation_timeout_sec: 60
• ansible_winrm_read_timeout_sec: 70
• ansible_winrm_server_cert_validation: ignore
• ansible_winrm_transport: kerberos
© Wärtsilä PUBLIC 3.4.2019 [Presentation name / Author]13
Playbooks – AWX Templates
• Defined templates and divided them into
• 20 Adhoc template – configurations
that can run independently
• 6 ’workflow’ templates, that execute
sequentially other templates
• We decided not to use AWX Workflows
• It was hard to track versions in AWX
WF module
• import_playbook works well enough
© Wärtsilä PUBLIC 3.4.2019 [Presentation name / Author]14
Sequential workflow
• All is for now executed sequentially
• Starting from main refresh playbook
• Executing all sub books one by one
• We don’t have such critical requirements
at the moment, as long as we can
deliver within one day
© Wärtsilä PUBLIC
ANSIBLE USE CASES
3.4.2019 [Presentation name / Author]15
© Wärtsilä PUBLIC 3.4.2019 [Presentation name / Author]16
Use case 1: Copy SQL Server Database from instance to another
• Playbook utilizes PowerShell and
DbaTools / dbatools.io
• Ansible Modules and Galaxy has limited
support for SQL Server
• Mostly only installing the SQL server,
not the stuff we need to do
• Could have used PowerShell SQL
Server modules, but dbatools was
superior
• Save some existing information from database using
SQL queries
• Copy existing database from one instance to another
• Backup into a file in original server (Backup-
DbaDatabase)
• Copy backup file to another server
• Read information about the backup, like file
locations (Read-DbaBackupHeader)
• Define new DB file locations
• Restore to the new server (Restore-DbaDatabase)
• Calling multiple queries (Invoke-DbaSqlQuery)
• Change recovery model to Simple
• Shrink logfiles
• Disabling triggers
• Granting DEV accesses to the DB
• Update restored database contents to suit the new
environment
• Had to submit a PRs for dbatools related to credentials and
PowerShell compatibility
© Wärtsilä PUBLIC 3.4.2019 [Presentation name / Author]17
Use case 2: Refresh Application binaries from prod to <target>
• Copy Java runtime and application
binaries
• Update configuration files
• Create new win network shares
• Run application commands
• Manipulate XML files
• Install Windows services
• Copying ~7 GB of files – you need
something else than ansible_copy
• win_robocopy does the trick
• we had to fix timeout/memory issues in
PowerShell by Windows Patch
• Instead of changing configuration files
from Prod, we created jinja templates that
set the environment correctly
• In different modules the  vs / is all over
the place
• Manipulating and reading XML files is
challenging
• Ansible vs PowerShell encodings.
• Sometimes result is UTF16 and sometimes
1251. We converted the results just in case.
# Caution: choice of encoding is determined by Ansible. Sometimes it is UTF16, sometimes it is 1251.
$backup_xml = [xml]([System.Text.Encoding]::GetEncoding("windows-
1251").GetString([System.Convert]::FromBase64String($backup_xml_b64)))
© Wärtsilä PUBLIC 3.4.2019 [Presentation name / Author]18
Use case 3: Install and configure IIS
• Install IIS feature using ansible module
• win_feature Web-WebServer and win_feature Web-Mgmt-Tools
• We exported prod IIS settings using appcmd
• appcmd list site /config /xml >site.xml
• appcmd list apppool /config /xml >pool.xml
• We created Jinja template from this
• Installing sites and app pools in IIS using ’appcmd’ in win_shell
• appcmd delete site ”<name>”
• appcmd delete apppool ”<name>”
• Get-Content site.xml | &$appcmd add site /in
• Get-Content pool.xml | &$appcmd add apppool /in
© Wärtsilä PUBLIC 3.4.2019 [Presentation name / Author]19
Use case 4: Calling Ansible from Jenkins
• Defined in Pipeline groovy definition
• Using Ansible as handy way to do
remote calls
• The playbook is utilizing our pre-
Ansible deployment script in the
server
• Our pipeline :
• Creating a change in ServiceNow
• Creating configuration files and
sources in git
• Creating a <change#>.yml file in git to
define what deployables are part of
the change.
• Deploy change using Jenking
© Wärtsilä PUBLIC 3.4.2019 [Presentation name / Author]20
After automating the system
deployment and configuration,
Teamcenter cloud deployment makes
sense
Only Dev deployment to start with
Start calling playbooks from AWX API
Start triggering Ansible playbooks
from ServiceNow
Start deploying changes to Prod
Increase coverage of Ansible
playbooks to secondary use cases
WHAT NEXT?
© Wärtsilä PUBLIC
THANK YOU
ANSIBLE COMMUNITY
Harri Piili
Solution Architect
Product Engineering & Lifecycle Management Services
Wärtsilä Information Management
Tel. +358 10 709 0000
Mob +358 50 5667309
harri.piili@wartsila.com
Wärtsilä Corporation
Hiililaiturinkuja 2
FI–00180 Helsinki, Finland
www.wartsila.com
3.4.2019 [Presentation name / Author]21

More Related Content

What's hot

A Million ways of Deploying a Kubernetes Cluster
A Million ways of Deploying a Kubernetes ClusterA Million ways of Deploying a Kubernetes Cluster
A Million ways of Deploying a Kubernetes ClusterJimmy Lu
 
Container Conf 2017: Rancher Kubernetes
Container Conf 2017: Rancher KubernetesContainer Conf 2017: Rancher Kubernetes
Container Conf 2017: Rancher KubernetesVishal Biyani
 
Aks pimarox from zero to hero
Aks pimarox from zero to heroAks pimarox from zero to hero
Aks pimarox from zero to heroJohan Biere
 
Docker - A curtain raiser to the Container world
Docker - A curtain raiser to the Container worldDocker - A curtain raiser to the Container world
Docker - A curtain raiser to the Container worldzekeLabs Technologies
 
Jelastic platform-as-infrastructure
Jelastic platform-as-infrastructureJelastic platform-as-infrastructure
Jelastic platform-as-infrastructureTetiana Fydorenchyk
 
A curtain-raiser to the container world Docker & Kubernetes
A curtain-raiser to the container world Docker & KubernetesA curtain-raiser to the container world Docker & Kubernetes
A curtain-raiser to the container world Docker & KuberneteszekeLabs Technologies
 
How to Make Money Solving 5 Major Problems of Cloud Hosting Customers
How to Make Money Solving 5 Major Problems of Cloud Hosting CustomersHow to Make Money Solving 5 Major Problems of Cloud Hosting Customers
How to Make Money Solving 5 Major Problems of Cloud Hosting CustomersJelastic Multi-Cloud PaaS
 
Baylisa - Dive Into OpenStack
Baylisa - Dive Into OpenStackBaylisa - Dive Into OpenStack
Baylisa - Dive Into OpenStackJesse Andrews
 
Containers and microservices for realists
Containers and microservices for realistsContainers and microservices for realists
Containers and microservices for realistsKarthik Gaekwad
 
Jelastic DevOps for Containers
Jelastic DevOps for ContainersJelastic DevOps for Containers
Jelastic DevOps for ContainersRuslan Synytsky
 
Build your own private Cloud environment
Build your own private Cloud environmentBuild your own private Cloud environment
Build your own private Cloud environmentNico Meisenzahl
 
Developing Enterprise Applications for the Cloud, from Monolith to Microservices
Developing Enterprise Applications for the Cloud,from Monolith to MicroservicesDeveloping Enterprise Applications for the Cloud,from Monolith to Microservices
Developing Enterprise Applications for the Cloud, from Monolith to MicroservicesDavid Currie
 
Using Docker in production: Get started today!
Using Docker in production: Get started today!Using Docker in production: Get started today!
Using Docker in production: Get started today!Clarence Bakirtzidis
 
Avishay Traeger & Shimshon Zimmerman, Stratoscale - Deploying OpenStack Cinde...
Avishay Traeger & Shimshon Zimmerman, Stratoscale - Deploying OpenStack Cinde...Avishay Traeger & Shimshon Zimmerman, Stratoscale - Deploying OpenStack Cinde...
Avishay Traeger & Shimshon Zimmerman, Stratoscale - Deploying OpenStack Cinde...Cloud Native Day Tel Aviv
 
Radical Innovations In Storage for Multi-Tenant Infrastructure
Radical Innovations In Storage for Multi-Tenant InfrastructureRadical Innovations In Storage for Multi-Tenant Infrastructure
Radical Innovations In Storage for Multi-Tenant InfrastructureNetApp
 
JELASTIC IS THE PIONEER AND VISIONARY IN THE CLOUD INDUSTRY
JELASTIC IS THE PIONEER AND VISIONARY IN THE CLOUD INDUSTRYJELASTIC IS THE PIONEER AND VISIONARY IN THE CLOUD INDUSTRY
JELASTIC IS THE PIONEER AND VISIONARY IN THE CLOUD INDUSTRYRuslan Synytsky
 
OpenStack Block Storage 101
OpenStack Block Storage 101OpenStack Block Storage 101
OpenStack Block Storage 101NetApp
 
A (XPages) developers guide to Cloudant - MeetIT
A (XPages) developers guide to Cloudant - MeetITA (XPages) developers guide to Cloudant - MeetIT
A (XPages) developers guide to Cloudant - MeetITFrank van der Linden
 

What's hot (20)

A Million ways of Deploying a Kubernetes Cluster
A Million ways of Deploying a Kubernetes ClusterA Million ways of Deploying a Kubernetes Cluster
A Million ways of Deploying a Kubernetes Cluster
 
Container Conf 2017: Rancher Kubernetes
Container Conf 2017: Rancher KubernetesContainer Conf 2017: Rancher Kubernetes
Container Conf 2017: Rancher Kubernetes
 
Aks pimarox from zero to hero
Aks pimarox from zero to heroAks pimarox from zero to hero
Aks pimarox from zero to hero
 
Docker - A curtain raiser to the Container world
Docker - A curtain raiser to the Container worldDocker - A curtain raiser to the Container world
Docker - A curtain raiser to the Container world
 
Ansible day 1.ppt
Ansible day 1.pptAnsible day 1.ppt
Ansible day 1.ppt
 
Jelastic platform-as-infrastructure
Jelastic platform-as-infrastructureJelastic platform-as-infrastructure
Jelastic platform-as-infrastructure
 
A curtain-raiser to the container world Docker & Kubernetes
A curtain-raiser to the container world Docker & KubernetesA curtain-raiser to the container world Docker & Kubernetes
A curtain-raiser to the container world Docker & Kubernetes
 
How to Make Money Solving 5 Major Problems of Cloud Hosting Customers
How to Make Money Solving 5 Major Problems of Cloud Hosting CustomersHow to Make Money Solving 5 Major Problems of Cloud Hosting Customers
How to Make Money Solving 5 Major Problems of Cloud Hosting Customers
 
Baylisa - Dive Into OpenStack
Baylisa - Dive Into OpenStackBaylisa - Dive Into OpenStack
Baylisa - Dive Into OpenStack
 
Containers and microservices for realists
Containers and microservices for realistsContainers and microservices for realists
Containers and microservices for realists
 
Jelastic DevOps for Containers
Jelastic DevOps for ContainersJelastic DevOps for Containers
Jelastic DevOps for Containers
 
Docker swarm
Docker swarmDocker swarm
Docker swarm
 
Build your own private Cloud environment
Build your own private Cloud environmentBuild your own private Cloud environment
Build your own private Cloud environment
 
Developing Enterprise Applications for the Cloud, from Monolith to Microservices
Developing Enterprise Applications for the Cloud,from Monolith to MicroservicesDeveloping Enterprise Applications for the Cloud,from Monolith to Microservices
Developing Enterprise Applications for the Cloud, from Monolith to Microservices
 
Using Docker in production: Get started today!
Using Docker in production: Get started today!Using Docker in production: Get started today!
Using Docker in production: Get started today!
 
Avishay Traeger & Shimshon Zimmerman, Stratoscale - Deploying OpenStack Cinde...
Avishay Traeger & Shimshon Zimmerman, Stratoscale - Deploying OpenStack Cinde...Avishay Traeger & Shimshon Zimmerman, Stratoscale - Deploying OpenStack Cinde...
Avishay Traeger & Shimshon Zimmerman, Stratoscale - Deploying OpenStack Cinde...
 
Radical Innovations In Storage for Multi-Tenant Infrastructure
Radical Innovations In Storage for Multi-Tenant InfrastructureRadical Innovations In Storage for Multi-Tenant Infrastructure
Radical Innovations In Storage for Multi-Tenant Infrastructure
 
JELASTIC IS THE PIONEER AND VISIONARY IN THE CLOUD INDUSTRY
JELASTIC IS THE PIONEER AND VISIONARY IN THE CLOUD INDUSTRYJELASTIC IS THE PIONEER AND VISIONARY IN THE CLOUD INDUSTRY
JELASTIC IS THE PIONEER AND VISIONARY IN THE CLOUD INDUSTRY
 
OpenStack Block Storage 101
OpenStack Block Storage 101OpenStack Block Storage 101
OpenStack Block Storage 101
 
A (XPages) developers guide to Cloudant - MeetIT
A (XPages) developers guide to Cloudant - MeetITA (XPages) developers guide to Cloudant - MeetIT
A (XPages) developers guide to Cloudant - MeetIT
 

Similar to Ansible Meetup FI - Ansible use cases with enterprise application

Edge 2016 Session 1886 Building your own docker container cloud on ibm power...
Edge 2016 Session 1886  Building your own docker container cloud on ibm power...Edge 2016 Session 1886  Building your own docker container cloud on ibm power...
Edge 2016 Session 1886 Building your own docker container cloud on ibm power...Yong Feng
 
CloudStack Tooling Ecosystem – Kiran Chavala, ShapeBlue
CloudStack Tooling Ecosystem – Kiran Chavala, ShapeBlueCloudStack Tooling Ecosystem – Kiran Chavala, ShapeBlue
CloudStack Tooling Ecosystem – Kiran Chavala, ShapeBlueShapeBlue
 
WebSphere and Docker
WebSphere and DockerWebSphere and Docker
WebSphere and DockerDavid Currie
 
Continuous Delivery to Kubernetes with Jenkins and Helm
Continuous Delivery to Kubernetes with Jenkins and HelmContinuous Delivery to Kubernetes with Jenkins and Helm
Continuous Delivery to Kubernetes with Jenkins and HelmDavid Currie
 
Command central 9.7: Features Overview
Command central 9.7: Features OverviewCommand central 9.7: Features Overview
Command central 9.7: Features OverviewSoftware AG
 
IBM Container Service Overview
IBM Container Service OverviewIBM Container Service Overview
IBM Container Service OverviewKyle Brown
 
Engineering Software Products: 5. cloud based software
Engineering Software Products: 5. cloud based softwareEngineering Software Products: 5. cloud based software
Engineering Software Products: 5. cloud based softwaresoftware-engineering-book
 
Rome .NET Conference 2024 - Remote Conference
Rome .NET Conference 2024  - Remote ConferenceRome .NET Conference 2024  - Remote Conference
Rome .NET Conference 2024 - Remote ConferenceHamida Rebai Trabelsi
 
MongoDB MUG Delhi NCR - December 19 2020 (Cloud Security)
MongoDB MUG Delhi NCR - December 19 2020 (Cloud Security)MongoDB MUG Delhi NCR - December 19 2020 (Cloud Security)
MongoDB MUG Delhi NCR - December 19 2020 (Cloud Security)Shrey Batra
 
The Fastest Way to Redis on Pivotal Cloud Foundry
The Fastest Way to Redis on Pivotal Cloud FoundryThe Fastest Way to Redis on Pivotal Cloud Foundry
The Fastest Way to Redis on Pivotal Cloud FoundryVMware Tanzu
 
Jenkins Workflow Webinar - Dec 10, 2014
Jenkins Workflow Webinar - Dec 10, 2014Jenkins Workflow Webinar - Dec 10, 2014
Jenkins Workflow Webinar - Dec 10, 2014CloudBees
 
Migrating Java EE applications to IBM Bluemix platform as-a-service (CloudFou...
Migrating Java EE applications to IBM Bluemix platform as-a-service (CloudFou...Migrating Java EE applications to IBM Bluemix platform as-a-service (CloudFou...
Migrating Java EE applications to IBM Bluemix platform as-a-service (CloudFou...Jack-Junjie Cai
 
Migrating Java EE applications to IBM Bluemix Platform-as-a-Service
Migrating Java EE applications to IBM Bluemix Platform-as-a-ServiceMigrating Java EE applications to IBM Bluemix Platform-as-a-Service
Migrating Java EE applications to IBM Bluemix Platform-as-a-ServiceDavid Currie
 
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018Mandi Walls
 
Morning Coffee - Windows Server 2016
Morning Coffee - Windows Server 2016Morning Coffee - Windows Server 2016
Morning Coffee - Windows Server 2016Primend
 
Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure
Heading to the Cloud : Introduction to deploying a Provider-Hosted App in AzureHeading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure
Heading to the Cloud : Introduction to deploying a Provider-Hosted App in AzureXenox Garavito
 
Eclipse tools for deployment to was liberty profile in Bluemix
Eclipse tools for deployment to was liberty profile in BluemixEclipse tools for deployment to was liberty profile in Bluemix
Eclipse tools for deployment to was liberty profile in BluemixEclipse Day India
 
Deploying to and Configuring WebSphere Application Server with UrbanCode Deploy
Deploying to and Configuring WebSphere Application Server with UrbanCode DeployDeploying to and Configuring WebSphere Application Server with UrbanCode Deploy
Deploying to and Configuring WebSphere Application Server with UrbanCode DeployIBM DevOps
 

Similar to Ansible Meetup FI - Ansible use cases with enterprise application (20)

Edge 2016 Session 1886 Building your own docker container cloud on ibm power...
Edge 2016 Session 1886  Building your own docker container cloud on ibm power...Edge 2016 Session 1886  Building your own docker container cloud on ibm power...
Edge 2016 Session 1886 Building your own docker container cloud on ibm power...
 
CloudStack Tooling Ecosystem – Kiran Chavala, ShapeBlue
CloudStack Tooling Ecosystem – Kiran Chavala, ShapeBlueCloudStack Tooling Ecosystem – Kiran Chavala, ShapeBlue
CloudStack Tooling Ecosystem – Kiran Chavala, ShapeBlue
 
WebSphere and Docker
WebSphere and DockerWebSphere and Docker
WebSphere and Docker
 
Continuous Delivery to Kubernetes with Jenkins and Helm
Continuous Delivery to Kubernetes with Jenkins and HelmContinuous Delivery to Kubernetes with Jenkins and Helm
Continuous Delivery to Kubernetes with Jenkins and Helm
 
Command central 9.7: Features Overview
Command central 9.7: Features OverviewCommand central 9.7: Features Overview
Command central 9.7: Features Overview
 
IBM Container Service Overview
IBM Container Service OverviewIBM Container Service Overview
IBM Container Service Overview
 
Engineering Software Products: 5. cloud based software
Engineering Software Products: 5. cloud based softwareEngineering Software Products: 5. cloud based software
Engineering Software Products: 5. cloud based software
 
Rome .NET Conference 2024 - Remote Conference
Rome .NET Conference 2024  - Remote ConferenceRome .NET Conference 2024  - Remote Conference
Rome .NET Conference 2024 - Remote Conference
 
MongoDB MUG Delhi NCR - December 19 2020 (Cloud Security)
MongoDB MUG Delhi NCR - December 19 2020 (Cloud Security)MongoDB MUG Delhi NCR - December 19 2020 (Cloud Security)
MongoDB MUG Delhi NCR - December 19 2020 (Cloud Security)
 
The Fastest Way to Redis on Pivotal Cloud Foundry
The Fastest Way to Redis on Pivotal Cloud FoundryThe Fastest Way to Redis on Pivotal Cloud Foundry
The Fastest Way to Redis on Pivotal Cloud Foundry
 
Cicd.pdf
Cicd.pdfCicd.pdf
Cicd.pdf
 
Power of Azure Devops
Power of Azure DevopsPower of Azure Devops
Power of Azure Devops
 
Jenkins Workflow Webinar - Dec 10, 2014
Jenkins Workflow Webinar - Dec 10, 2014Jenkins Workflow Webinar - Dec 10, 2014
Jenkins Workflow Webinar - Dec 10, 2014
 
Migrating Java EE applications to IBM Bluemix platform as-a-service (CloudFou...
Migrating Java EE applications to IBM Bluemix platform as-a-service (CloudFou...Migrating Java EE applications to IBM Bluemix platform as-a-service (CloudFou...
Migrating Java EE applications to IBM Bluemix platform as-a-service (CloudFou...
 
Migrating Java EE applications to IBM Bluemix Platform-as-a-Service
Migrating Java EE applications to IBM Bluemix Platform-as-a-ServiceMigrating Java EE applications to IBM Bluemix Platform-as-a-Service
Migrating Java EE applications to IBM Bluemix Platform-as-a-Service
 
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018
 
Morning Coffee - Windows Server 2016
Morning Coffee - Windows Server 2016Morning Coffee - Windows Server 2016
Morning Coffee - Windows Server 2016
 
Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure
Heading to the Cloud : Introduction to deploying a Provider-Hosted App in AzureHeading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure
Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure
 
Eclipse tools for deployment to was liberty profile in Bluemix
Eclipse tools for deployment to was liberty profile in BluemixEclipse tools for deployment to was liberty profile in Bluemix
Eclipse tools for deployment to was liberty profile in Bluemix
 
Deploying to and Configuring WebSphere Application Server with UrbanCode Deploy
Deploying to and Configuring WebSphere Application Server with UrbanCode DeployDeploying to and Configuring WebSphere Application Server with UrbanCode Deploy
Deploying to and Configuring WebSphere Application Server with UrbanCode Deploy
 

Recently uploaded

Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 

Recently uploaded (20)

Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 

Ansible Meetup FI - Ansible use cases with enterprise application

  • 1. © Wärtsilä PUBLIC Ansible @Wärtsilä Ansible use cases with legacy application, Siemens Teamcenter Harri Piili Solution Architect Product Engineering & Lifecycle Management Services Information Management 3.4.2019 [Presentation name / Author]1
  • 3. WÄRTSILÄ CORPORATION OUR PERSONNEL Approximately 19,000 professionals In over 200 locations In more than 80 countries
  • 4. © Wärtsilä PUBLIC INFORMATION MANAGEMENT BUSINESS PRODUCTIVITY PRODUCT ENGINEERING & LIFECYCLE MANAGEMENT SERVICES PDM/PLM Product Data Management Product Lifecycle Management Main PDM/PLM solutions in use is Siemens Teamcenter ~1000 users 3.4.2019 [Presentation name / Author]4 Purpose Via PDM/PLM service Product engineers can have access to Wärtsilä’s product portfolio at any location, which allows them to utilize existing designs and ensure that designs are functional while using resources more efficiently when businesses will collaborate over organizational barriers and share Products and Solutions information throughout the lifecycle.
  • 6. © Wärtsilä PUBLIC • We have multiple environments – Production, PreProduction, QA, ~20 Devs • Using Ansible for refreshing PreProduction and QA quarterly as a copy of Production • Using Ansible for setting up Teamcenter clones in 6 hours instead of 6 days • Improved consistency of system deployments • Deploying stories and changes to QA and Dev environments • Still ramping up the confidence for Prod deployments [Presentation name / Author]6 Using Ansible to configure Teamcenter systems HIGHLIGHTS 3.4.2019 COULD NOT HAVE DONE ALL THIS WITHOUT A GOOD PARTNER THANKS EFICODE / HOWARD GUO
  • 7. © Wärtsilä PUBLIC 3.4.2019 [Presentation name / Author]7 Various use cases • Copy SQL Server Database from instance to another • Copying Teamcenter related binaries to target servers • Modifying environment specific configuration files • Creating directories, network shares and controlling accesses • Running application utilities to configure system • Creating OS services • Installing and configuring IIS and applications under it • Deploying related Tomcat services • Deploying changes via Jenkins using Ansible Pretty complicated system to configure and running on Windows
  • 8. © Wärtsilä PUBLIC 3.4.2019 [Presentation name / Author]8 Prerequisites before starting configuration • Setting up Ansible authentication using Kerberos against Windows Active Directory • Automating Ansible AWX Environment setup with Terraform and Ansible at Amazon EC2 • Authenticating Ansible in BitBucket - access keys • Defining Ansible variable strategy • Setting up AWX inventory from git repo • Authenticating AWX users to Active Directory using LDAP • Patching old Win 2008R2 servers • Doing investigation spikes
  • 9. © Wärtsilä PUBLIC ANSIBLE AWX SETUP 3.4.2019 [Presentation name / Author]9
  • 10. © Wärtsilä PUBLIC 3.4.2019 [Presentation name / Author]10 Setting up the project • Started by defining credentials • Git users, service user, DB users etc. • AWX automatically keeps these as secrets • Defined a project • Connected to git • Defined to synchronize automatically
  • 11. © Wärtsilä PUBLIC 3.4.2019 [Presentation name / Author]11 LDAP Authentication and credentials in AWX • AWX can authenticate logins using LDAP • A new user gets added, when user logs in
  • 12. © Wärtsilä PUBLIC 3.4.2019 [Presentation name / Author]12 Inventories • You can define AWX inventory to be fetched from various sources, like source control, cloud provider services, vmware, custom scripts. • We chose inventory from project source i.e. from git • Each time we create a new Teamcenter environment, we create a new inventory subdir in git • AWX automatically synchronizes the inventory • Using Ansible in Windows environment of needs some winrm settings • ansible_connection: winrm • ansible_winrm_kerberos_delegation: true • ansible_winrm_operation_timeout_sec: 60 • ansible_winrm_read_timeout_sec: 70 • ansible_winrm_server_cert_validation: ignore • ansible_winrm_transport: kerberos
  • 13. © Wärtsilä PUBLIC 3.4.2019 [Presentation name / Author]13 Playbooks – AWX Templates • Defined templates and divided them into • 20 Adhoc template – configurations that can run independently • 6 ’workflow’ templates, that execute sequentially other templates • We decided not to use AWX Workflows • It was hard to track versions in AWX WF module • import_playbook works well enough
  • 14. © Wärtsilä PUBLIC 3.4.2019 [Presentation name / Author]14 Sequential workflow • All is for now executed sequentially • Starting from main refresh playbook • Executing all sub books one by one • We don’t have such critical requirements at the moment, as long as we can deliver within one day
  • 15. © Wärtsilä PUBLIC ANSIBLE USE CASES 3.4.2019 [Presentation name / Author]15
  • 16. © Wärtsilä PUBLIC 3.4.2019 [Presentation name / Author]16 Use case 1: Copy SQL Server Database from instance to another • Playbook utilizes PowerShell and DbaTools / dbatools.io • Ansible Modules and Galaxy has limited support for SQL Server • Mostly only installing the SQL server, not the stuff we need to do • Could have used PowerShell SQL Server modules, but dbatools was superior • Save some existing information from database using SQL queries • Copy existing database from one instance to another • Backup into a file in original server (Backup- DbaDatabase) • Copy backup file to another server • Read information about the backup, like file locations (Read-DbaBackupHeader) • Define new DB file locations • Restore to the new server (Restore-DbaDatabase) • Calling multiple queries (Invoke-DbaSqlQuery) • Change recovery model to Simple • Shrink logfiles • Disabling triggers • Granting DEV accesses to the DB • Update restored database contents to suit the new environment • Had to submit a PRs for dbatools related to credentials and PowerShell compatibility
  • 17. © Wärtsilä PUBLIC 3.4.2019 [Presentation name / Author]17 Use case 2: Refresh Application binaries from prod to <target> • Copy Java runtime and application binaries • Update configuration files • Create new win network shares • Run application commands • Manipulate XML files • Install Windows services • Copying ~7 GB of files – you need something else than ansible_copy • win_robocopy does the trick • we had to fix timeout/memory issues in PowerShell by Windows Patch • Instead of changing configuration files from Prod, we created jinja templates that set the environment correctly • In different modules the vs / is all over the place • Manipulating and reading XML files is challenging • Ansible vs PowerShell encodings. • Sometimes result is UTF16 and sometimes 1251. We converted the results just in case. # Caution: choice of encoding is determined by Ansible. Sometimes it is UTF16, sometimes it is 1251. $backup_xml = [xml]([System.Text.Encoding]::GetEncoding("windows- 1251").GetString([System.Convert]::FromBase64String($backup_xml_b64)))
  • 18. © Wärtsilä PUBLIC 3.4.2019 [Presentation name / Author]18 Use case 3: Install and configure IIS • Install IIS feature using ansible module • win_feature Web-WebServer and win_feature Web-Mgmt-Tools • We exported prod IIS settings using appcmd • appcmd list site /config /xml >site.xml • appcmd list apppool /config /xml >pool.xml • We created Jinja template from this • Installing sites and app pools in IIS using ’appcmd’ in win_shell • appcmd delete site ”<name>” • appcmd delete apppool ”<name>” • Get-Content site.xml | &$appcmd add site /in • Get-Content pool.xml | &$appcmd add apppool /in
  • 19. © Wärtsilä PUBLIC 3.4.2019 [Presentation name / Author]19 Use case 4: Calling Ansible from Jenkins • Defined in Pipeline groovy definition • Using Ansible as handy way to do remote calls • The playbook is utilizing our pre- Ansible deployment script in the server • Our pipeline : • Creating a change in ServiceNow • Creating configuration files and sources in git • Creating a <change#>.yml file in git to define what deployables are part of the change. • Deploy change using Jenking
  • 20. © Wärtsilä PUBLIC 3.4.2019 [Presentation name / Author]20 After automating the system deployment and configuration, Teamcenter cloud deployment makes sense Only Dev deployment to start with Start calling playbooks from AWX API Start triggering Ansible playbooks from ServiceNow Start deploying changes to Prod Increase coverage of Ansible playbooks to secondary use cases WHAT NEXT?
  • 21. © Wärtsilä PUBLIC THANK YOU ANSIBLE COMMUNITY Harri Piili Solution Architect Product Engineering & Lifecycle Management Services Wärtsilä Information Management Tel. +358 10 709 0000 Mob +358 50 5667309 harri.piili@wartsila.com Wärtsilä Corporation Hiililaiturinkuja 2 FI–00180 Helsinki, Finland www.wartsila.com 3.4.2019 [Presentation name / Author]21