Where can I find updated source code for Jorge Acetozi book "Continuous Delivery for Java Apps: Kubernetes and Jenkins in Practice" - spring-boot

I just started reading the Jorge Acetozi book "Continuous Delivery for Java Apps: Kubernetes and Jenkins in Practice".
For the code examples I use the source code in his github repository:
https://github.com/jorgeacetozi
Unfortunately this code doesn't work for Java 11 and uses old Spring Boot 1.5 version
Also Jenkins, Selenium, Kubernetes and Vagrant tools, described in the book, use very old versions.
Has anyone finished this book lately, could you please, provide the updated source code for this book?
Unfortunately, the old source code, prevents me from learning further.

I have managed to finish this book, but did a lot of changes to the source code:
https://github.com/skyglass/notepad - updated source code for Notepad Spring Boot application.
Spring Boot has been updated to version 2.4.2.
I had to make lots of changes to the front-end code, to make styles displayed correctly with the latest version of Thymeleaf library.
Also did some other changes, related to update from Java8 to Java11.
All maven dependencies have been updated to the latest versions
https://github.com/skyglass/jenkins-kubernetes-cd - This repository corresponds to Jorge Acetozi's "ebook-continuous-delivery-with-kubernetes-and-jenkins" repository.
"docker-images" folder contain "jenkins", "kubectl" and "maven-jdk11-git" docker image files, which are used by Jenkins pipelines
Kubernetes yaml files have been updated to the latest version of Kubernetes
Unfortunately, I couldn't manage to make acceptance tests working for "Firefox" browser, with the latest "Selenium Grid" docker images. Therefore, acceptance-tests pipeline code only contains tests with "Chrome" browser
All Jenkins files have been updated to use the latest docker images, or custom docker images, published by me in Skyglass Docker Hub. Feel free to publish them in your own docker hub, using docker files from "docker-images" folder.
"docker-images" folder contains custom docker image to run Jenkins. I recommend using this image to run Jenkins on your computer. It uses the latest version of jenkins for jdk11 and all needed plugins with the latest versions
https://github.com/skyglass/notepad-performance-tests - the performance tests have been updated for the latest versions of Scala, SBT and Gatling.
https://tferdinand.net/en/create-a-local-kubernetes-cluster-with-vagrant/
https://www.exxactcorp.com/blog/HPC/building-a-kubernetes-cluster-using-vagrant
These articles will help you to install Kubernetes Cluster locally, with Vagrant and VirtualBox.
Of course, I also used lot of other online resources. StackOverflow helped me a lot. :)
Have fun reading this book, hope these examples help you get the best learning experience.
Thank you, Jorge Acetozi, for this wonderful book!

Related

Deploying multiple SNAPSHOT artifacts into the same repository in Sonatype OSSRH

I've seen Building and deploying native code using Maven - but can't get this (very similar) deployment working as I'd like..
I have a C++ project that builds with Maven, and the Maven CMake Plugin. This involves several Maven profiles, to select the correct settings for the various C++ compilers I use on the platforms I'm building on. (Windows 10, Ubuntu 16.04, Ubuntu 18.04, CentOS 7, Raspbian, macOS High Sierra). I use Jenkins to run this build on the various VMs/Raspberry Pi - yielding a .tar.gz or .zip via the Maven Assembly Plugin. The final result is six archive files, that vary in their classifier/type. They all have the same groupId/artifactId.
I wanted each of these jobs to deploy its archive to Sonatype's OSSRH Nexus system, using the nexus-staging-maven-plugin.
I had this plugin configured to not automatically close the repository, so that the multiple builds could run via Jenkins (sequentially), and deploy to the same repo. I would then review this in the web UI, then Release or Drop it appropriately.
This worked fine, when the project had a version number of 0.0.1-SNAPSHOT. However, when I decided to (manually) release this, by setting the version to 0.0.1, and run my Jenkins builds... the deployment behaviour was different to what I'd seen when it was a SNAPSHOT.
Each platform-specific deployment created its own staging repository in the OSSRH Snapshots repo.
After reading https://github.com/sonatype/nexus-maven-plugins/tree/master/staging/maven-plugin, I have tried a variety of these settings, but nothing seems to work:
<skipStagingRepositoryClose>true</skipStagingRepositoryClose>
<skipStaging>true</skipStaging>
<autoReleaseAfterClose>false</autoReleaseAfterClose>
<stagingRepositoryId>${project.artifactId}-${project.version}-repo</stagingRepositoryId>
The nexus-staging:rc-open goal looks like it might help, allowing me to open a named staging repository (as I tried to do with stagingRepositoryId, above) - but it requires a staging profile id - I've used the rc-list-profiles goal to find mine - but when I give this to rc-open, it's reported as "missing or invalid".
It looks like this should be possible: https://github.com/sonatype/nexus-maven-plugins/blob/master/staging/maven-plugin/WORKFLOWS.md - this suggests that you can't create a new staging profile id; that they're allocated by Nexus.
Why is this mechanism different between SNAPSHOT and non-SNAPSHOT deployments?
Kind regards, Matt
I've updated https://stackoverflow.com/a/40954957/14731. Per point 6.6, SNAPSHOTs cannot be released atomically. There is no known workaround.

How to import and run Nifi source code in eclipse

How to import and run Apache NiFi using eclipse IDE. There is no documentation for development purpose, as I wanted to change the source code for UI related. Is there any guide for import and run Apache NiFi(maven project).
Below is the project structure where nifi is the parent directory and all are its module. So, how can I run run using eclipse, run configuration required.
I just wanted to modify the whole NiFi UI.
There is a very extensive Developer Guide with discussion around common development patterns and problems, a Contributor Guide with instructions for cloning the git repository and importing the code into various development environments, and I have done presentations on developing custom processors. Do these not address your questions? We are always welcome to feedback on how to improve documentation and ease of use.

Allure plugin for TeamCity: why agent doesn't complete upgrade?

I've asked this question on Gitter, but answer directed me to the documentation I followed.
I'm administrator of TeamCity 2017.2.2 with agents running on Windows 10 (except one on 7). I installed allure-teamcity plugin version 2.6 and added allure tools in version 2.6 as described in the documentation.
The problem is the tool is propagated to the agent on upgrade, but not the plugin itself. Main server shows me the runner I can use as a build step, but once configured none of agents accept this configuration. I've checked agent directory and logs - the plugin is not there and logs doesn't indicate that there was even attempt to pull.
As a holder of commercial license I asked JetBrains technical support, but they told me I need to ask Allure authors. GitHub sends people to Gitter and here, hence the question after unlucky attempt on Gitter.
What do I need to do to get the plugin correctly pulled and working on agents?
Is allure plugin even compatible with TeamCity 2017.2.2?
The problem is that Allure TeamCity plugin looks for a tool called allure-commandline. So you need to make sure that allure-commandline.zip is present in your <TeamCity Data Directory>/plugins/.tools directory.

Alfresco deployment doesn't work

I've created the simple example from here, then packaged it using mvn package, and made an effort to deploy the result amp file as described here. But after restarting Alfresco I didn't see any changes. There were no new variants of workflow to choose. The java -jar alfresco-mmt.jar list <WARFileLocation> executing showed that modules org.alfresco.integrations.google.docs and org.alfresco.vti are installed in the chosen war but not a word about my helloworld workflow
UPD: I looked deeper through the tutorial and found that to add an activiti to the share u first need to add some other activiti to the alfresco. it is told there:
Open a command-line window and switch to
$TUTORIAL_HOME/workflow-tutorial-repo. Run mvn integration-test
-Pamp-to-war -Dmodule.log.level=debug. Your repo tier project will be installed and started on Tomcat running on port 8080. Open a new
command-line window and switch to
$TUTORIAL_HOME/workflow-tutorial-share. Run mvn integration-test
-Pamp-to-war -Dmaven.tomcat.port=8081
why is it so? I can't just deploy the only one project to the share but need to make a progect for the Alfresco first?
By the command you wrote you start repo. Since share and repo running on the same server they should run on different ports, so for share you need to provide another port, which is done by additional parameter: -Dmaven.tomcat.port=8081
UPD
#NikitinMikhail The quote you've added describes how to start share.
Alfresco consists of two projects (according to the maven sdk you use) which are repo and share.
Alfresco Share provides a rich web-based collaboration environment for managing documents, wiki content, blogs and more. Share leverages the Alfresco repository to provide content services and utilises the Alfresco Surf Platform to provide the underlying presentation framework.
In other words share is just separate project which communicates with repo and provides better user interface than repo.

Maven project uploads to Google Code 'Downloads' tab

Note: I am not asking how to use Google Code's SVN repo as a Maven repo :-)
I'm looking for the simplest / most reliable way to automate uploading the built artifacts of a Maven project to a Google Code 'Downloads' tab.
I've found 4 different Google Code Maven plugins that claim to do this, but would appreciate any advice on evaluating them as fit-for-purpose, because they all seem to be in various states of inactivity.
maven-googlecode-plugin (Last commit: Sept 2009. Latest version: 0.0.1-SNAPSHOT)
gcupload-maven-plugin (Last commit: Jan 2009. Latest version: 0.9)
maven-gcu-plugin (Last commit: Oct 2010. Latest version: 1.1)
maven-googlecode (Last commit: Feb 2008. Latest version: 2.0, but labelled 'test')
In addition to these 'level of activity' clues, some of them offer their releases on the 'Downloads' tabs, which might be a good sign from an 'eat your own dogfood' viewpoint; but as these are supposed to be Maven plugins, having them available in Maven Central might inspire more confidence.
Anyone care to comment (perhaps even the owners / committers of these projects) ?
Thanks!
Update:
I have test-driven each one of these in turn and could not get any of them to work as advertised.
Two of them are still configured to upload to a Google Code URL ending in /files, whilst another claimed to work and reported success, but the artifacts did not appear in the 'Downloads' tab. With the last one there appeared to be no released code which could be referenced as a Maven plugin.
I have since emailed each of the project committers to see what can be done.
If you are not averse to looking beyond maven plugins, google code has a SciptedUploads documentation, which seems to provide a python script and an ant task for doing this.
You may want to start reading the comments bottoms-up to see challenges using them, if any.
I got to this page by clicking on the link to "Create a New Download" for my google code project and clicking on the "Tip".
I always wondered why google didn't offer a Maven repository for each project by default.
Digging further, I discovered the following deprecated project:
http://code.google.com/p/google-maven-repository/
It appears the recommendation is to publish releases to Maven Central. This makes a lot of sense, as it certainly simplifies the discovery and integration of your project with other open source.
This movement towards Maven Central is a welcome and increasing trend in Java projects. Large projects like Oracle, Spring and JBoss are now publishing their releases there.

Resources