使用Player FM应用程序离线!
Continuous Deployment with Natural – Legacy Coder Podcast #6
Fetch error
Hmmm there seems to be a problem fetching this series right now. Last successful fetch was on February 27, 2024 05:42 ()
What now? This series will be checked again in the next day. If you believe it should be working, please verify the publisher's feed link below is valid and includes actual episode links. You can contact support to request the feed be immediately fetched.
Manage episode 202845588 series 1918844
After you have automated the build process for your application based on Software AG’s Adabas and Natural it’s time to take the next step and also deploy the changes to production after each push to Git! I’ll tell you how in the sixth episode of the Legacy Coder Podcast.
Recap: Automating your build process with Continuous Integration
- Listen to Episode 2 of the Legacy Coder Podcast for an introduction on why you should automate everything from compilation to deployment.
- What is Continuous Integration?
- CI is a software development practice. Every developer integrates (i.e. merges) at least daily. Each integration is built and tested automatically.
- This leads to less integration problems and faster deployment cycles.
- What can go wrong when manually deploying to production (or the next stage)?
- Finding all the modules that you need to deploy.
- NAT0082 Invalid command, or Subprogram does not exist
- NAT0936 Format/length conflict in parameter
- NAT0933 GDA time-stamp conflict
- Separating different features in the same modules from each other.
- Nested functions or other dependent modules can’t be compiled.
- Compile errors nobody cares about (anymore).
Continuous Deployment with Blue/Green Deployments
- Basic Definitions
- What is Continuous Delivery?
- CD builds on top of CI and makes sure that the software can be released at any time. The deployment process has to be fully automated. You just need to push a button to deploy your software to the target environment.
- What is Continuous Deployment?
- CD goes even one step further and automatically deploys the software to production if all steps of the deployment pipeline pass. Finally, no more “release days”!
- What is a Deployment Pipeline?
- What is Pipeline as Code?
- Instead of manually creating the deployment pipeline in a CI server like Jenkins you can define all the necessary steps in a domain specific language that the CI server can execute. All the information needed to build and deploy the application are now contained inside the repository.
- What are Blue/Green Deployments?
- What is Continuous Delivery?
- Advantages of a fully automated deployment process with blue/green deployments
- No more missing files, GDA timestamp conflicts, or format/length conflicts.
- Fast feedback (“Fail Fast”) for the developers, problems are visible immediately.
- You can reliably and easily roll back to a previous state if something breaks.
- Interactive tests in the production environment are possible.
- Running processes and interactive session won’t be disturbed.
- Deployments don’t need to be done in the evenings or on weekends.
- No more annoying tasks for the (expensive) software developers.
Continuous Deployment for Software AG’s Natural
- These are the tools we use for our CI/CD process (most are Open Source).
- Git for version control.
- Gradle as a wrapper for SAG’s Ant script.
- Jenkins as a CI server.
- A custom Java program for compiling Natural on the target environment.
- NatUnit for unit testing.
- NaturalONE with additional plugins for NatUnit and staging.
- Redmine for documentation and communication with subject matter experts.
- Our former apprentice Jonas built a build lamp with a Raspberry Pi that shows the current state of our Natural build.
- Implementation at AO
- AO doesn’t have a single pipeline but 3 different ones for each individual branch: DEV, QA, and PROD. The core stages are identical, but they contain individual steps, e.g. for testing and deployment.
- Before the pipeline can do its job, the developer needs to decide which modules to stage. This is done with Redmine where each changed module is assigned to an issue.
- The first stage of the pipeline checks out the latest version of the Natural sources from Git.
- After that the target Fuser gets erased and recreated from scratch.
- We use SAG’s Ant script to upload the sources to the target server.
- We do a full build every time, not an incremental build.
- Compile errors are formatted as JUnit results so they can be displayed inside Jenkins.
- We don’t use SAG’s script for that because it doesn’t follow the StepLib chain (for whatever reason).
- After the compilation additional test data for testing legacy modules that rely on a certain database state are imported into Adabas.
- Now the unit and integration tests are executed.
- If the tests pass, the application is deployed into the next “free” FUser.
- After the deployment the current FUser may be set to the new one. But this depends on the environment.
- After the release is done there are a few additional steps required, e.g. restarting the Natural RPC servers against the new FUser.
- After each production release a tag in Git is created.
- And finally a changelog is generated from these Git tags.
How to start with Continuous Deployment for Natural
- First of all: use Git (or any other version control system, but I would prefer Git). Make your current production sources the new master branch and add development sources on top of that into a new branch.
- Switch to NaturalONE. Not only do you get a modern IDE with features like Code Completion, but more importantly you get the possibility to use version control from within NaturalONE. Your repository is now the source of truth (and not the server).
- Make your codebase compile! Don‘t allow any compilation error whatsoever!
- Add an additional FUser for the automated deployment after each push to Git.
- Generate the deployment script from within NaturalONE and put it into a Jenkins build. You don‘t need to create a Jenkinsfile yet. Start small!
- Start writing automated tests, e.g. with NatUnit. By the way: It’s open source! Feel free to use and modify it. https://sourceforge.net/projects/natunit/
Recommended reading
Links
- Continuous Integration
- Continuous integration vs. continuous delivery vs. continuous deployment |
- Continuous delivery – Wikipedia
- Continuous Deployment – Scaled Agile Framework
- DeploymentPipeline
- Git – a free and open source distributed version control system
- Jenkins – The leading open source automation server
- Gradle
- Redmine
- NatUnit
- Bauen einer Jenkins-Lampe zur Anzeige des Build-Status | Jonas Hellmann
The post Continuous Deployment with Natural – Legacy Coder Podcast #6 appeared first on SOA rocks!.
8集单集
Fetch error
Hmmm there seems to be a problem fetching this series right now. Last successful fetch was on February 27, 2024 05:42 ()
What now? This series will be checked again in the next day. If you believe it should be working, please verify the publisher's feed link below is valid and includes actual episode links. You can contact support to request the feed be immediately fetched.
Manage episode 202845588 series 1918844
After you have automated the build process for your application based on Software AG’s Adabas and Natural it’s time to take the next step and also deploy the changes to production after each push to Git! I’ll tell you how in the sixth episode of the Legacy Coder Podcast.
Recap: Automating your build process with Continuous Integration
- Listen to Episode 2 of the Legacy Coder Podcast for an introduction on why you should automate everything from compilation to deployment.
- What is Continuous Integration?
- CI is a software development practice. Every developer integrates (i.e. merges) at least daily. Each integration is built and tested automatically.
- This leads to less integration problems and faster deployment cycles.
- What can go wrong when manually deploying to production (or the next stage)?
- Finding all the modules that you need to deploy.
- NAT0082 Invalid command, or Subprogram does not exist
- NAT0936 Format/length conflict in parameter
- NAT0933 GDA time-stamp conflict
- Separating different features in the same modules from each other.
- Nested functions or other dependent modules can’t be compiled.
- Compile errors nobody cares about (anymore).
Continuous Deployment with Blue/Green Deployments
- Basic Definitions
- What is Continuous Delivery?
- CD builds on top of CI and makes sure that the software can be released at any time. The deployment process has to be fully automated. You just need to push a button to deploy your software to the target environment.
- What is Continuous Deployment?
- CD goes even one step further and automatically deploys the software to production if all steps of the deployment pipeline pass. Finally, no more “release days”!
- What is a Deployment Pipeline?
- What is Pipeline as Code?
- Instead of manually creating the deployment pipeline in a CI server like Jenkins you can define all the necessary steps in a domain specific language that the CI server can execute. All the information needed to build and deploy the application are now contained inside the repository.
- What are Blue/Green Deployments?
- What is Continuous Delivery?
- Advantages of a fully automated deployment process with blue/green deployments
- No more missing files, GDA timestamp conflicts, or format/length conflicts.
- Fast feedback (“Fail Fast”) for the developers, problems are visible immediately.
- You can reliably and easily roll back to a previous state if something breaks.
- Interactive tests in the production environment are possible.
- Running processes and interactive session won’t be disturbed.
- Deployments don’t need to be done in the evenings or on weekends.
- No more annoying tasks for the (expensive) software developers.
Continuous Deployment for Software AG’s Natural
- These are the tools we use for our CI/CD process (most are Open Source).
- Git for version control.
- Gradle as a wrapper for SAG’s Ant script.
- Jenkins as a CI server.
- A custom Java program for compiling Natural on the target environment.
- NatUnit for unit testing.
- NaturalONE with additional plugins for NatUnit and staging.
- Redmine for documentation and communication with subject matter experts.
- Our former apprentice Jonas built a build lamp with a Raspberry Pi that shows the current state of our Natural build.
- Implementation at AO
- AO doesn’t have a single pipeline but 3 different ones for each individual branch: DEV, QA, and PROD. The core stages are identical, but they contain individual steps, e.g. for testing and deployment.
- Before the pipeline can do its job, the developer needs to decide which modules to stage. This is done with Redmine where each changed module is assigned to an issue.
- The first stage of the pipeline checks out the latest version of the Natural sources from Git.
- After that the target Fuser gets erased and recreated from scratch.
- We use SAG’s Ant script to upload the sources to the target server.
- We do a full build every time, not an incremental build.
- Compile errors are formatted as JUnit results so they can be displayed inside Jenkins.
- We don’t use SAG’s script for that because it doesn’t follow the StepLib chain (for whatever reason).
- After the compilation additional test data for testing legacy modules that rely on a certain database state are imported into Adabas.
- Now the unit and integration tests are executed.
- If the tests pass, the application is deployed into the next “free” FUser.
- After the deployment the current FUser may be set to the new one. But this depends on the environment.
- After the release is done there are a few additional steps required, e.g. restarting the Natural RPC servers against the new FUser.
- After each production release a tag in Git is created.
- And finally a changelog is generated from these Git tags.
How to start with Continuous Deployment for Natural
- First of all: use Git (or any other version control system, but I would prefer Git). Make your current production sources the new master branch and add development sources on top of that into a new branch.
- Switch to NaturalONE. Not only do you get a modern IDE with features like Code Completion, but more importantly you get the possibility to use version control from within NaturalONE. Your repository is now the source of truth (and not the server).
- Make your codebase compile! Don‘t allow any compilation error whatsoever!
- Add an additional FUser for the automated deployment after each push to Git.
- Generate the deployment script from within NaturalONE and put it into a Jenkins build. You don‘t need to create a Jenkinsfile yet. Start small!
- Start writing automated tests, e.g. with NatUnit. By the way: It’s open source! Feel free to use and modify it. https://sourceforge.net/projects/natunit/
Recommended reading
Links
- Continuous Integration
- Continuous integration vs. continuous delivery vs. continuous deployment |
- Continuous delivery – Wikipedia
- Continuous Deployment – Scaled Agile Framework
- DeploymentPipeline
- Git – a free and open source distributed version control system
- Jenkins – The leading open source automation server
- Gradle
- Redmine
- NatUnit
- Bauen einer Jenkins-Lampe zur Anzeige des Build-Status | Jonas Hellmann
The post Continuous Deployment with Natural – Legacy Coder Podcast #6 appeared first on SOA rocks!.
8集单集
所有剧集
×欢迎使用Player FM
Player FM正在网上搜索高质量的播客,以便您现在享受。它是最好的播客应用程序,适用于安卓、iPhone和网络。注册以跨设备同步订阅。