Open zeehans opened 1 year ago
We have the same question/ challenge. In the presentation 'Automation & Build Server' slide 35 there is also mentioned that B&R uses a docker container on their Jenkins server
Hi @zeehans - thank you for the suggestion, it is a good one. As @knetsooj mentioned, we do indeed have docker containers set up on our internal server. Therefore, we will add some explanation into the PPT for how you can set this up on your side. We will also add our docker file to the template files. We plan to have this information added by the end of October.
@langstonb that's great. Please post an update in this issue when you have added that info.
@zeehans @knetsooj, I've just committed the Dockerfile and added instructions to the presentation for creating a Jenkins node and creating the docker container installing Automation Studio and the Jenkins agent.
@wesleybuchanan that's great. We'll try that out shortly.
@wesleybuchanan we tried building the Docker image using your Dockerfile but are getting stuck at importing the fieldbus devices. I believe that's how far we got the first time around last year as well with our own dockerfile. When we attempt a build of a project using a CP1585 PLC for instances we get the following error messages:
C:\source.plc\Micro\Physical\CP1585_1\Hardware.hw: (Ln: 637, Col: 33) error 4821:Support for hardware module type FBE.0000001D_CPX_FB40 is not available. Please install the corresponding upgrade. C:\source.plc\Micro\Physical\CP1585_1\Hardware.hw: (Ln: 637, Col: 62) warning 4821:Required version '1.0' for hardware module 'FBE.0000001D_CPX_FB40' is not installed currently. Please install the corresponding upgrade. C:\source.plc\Micro\Physical\CP1585_1\Hardware.hw: (Ln: 690, Col: 45) error 4821:Support for hardware module type FBE.00000230_UR20_8DI_P_2W is not available. Please install the corresponding upgrade. C:\source.plc\Micro\Physical\CP1585_1\Hardware.hw: (Ln: 690, Col: 79) warning 4821:Required version '1.0' for hardware module 'FBE.00000230_UR20_8DI_P_2W' is not installed currently. Please install the corresponding upgrade.
On a regular installation of AS the fieldbus dependencies would just be requested to be installed upon opening a project file. Unfortunately we can't seem to run AS out of the container - it just crashes. Can the fieldbus module files simply be copied across from a bare-metal installation or is there another way to install them without going through the UI?
Hi @zeehans ,
If you place the needed upgrades into the AS_Upgrades directory before creating the docker container then they should be installed after Automation Studio is installed. Specifically the lines 94 - 101 of the docker file handle this.
If there are upgrades that need to be installed after the container has been created you could mount a volume into the container and run the commands.
To mount a volume in docker first stop your container docker stop as_412 then run it with the -v to specify a volume. docker run -v /C/AS_Upgrades:/C/Temp/AS_Upgrades as_412 Then open a powershell command prompt on the container docker exec -it as_412 powershell Then run the following command in powershell C:\Temp\AS_Upgrade.exe -G='C:\BrAutomation' -V='C:\BrAutomation\AS412' -R | Out-Null; where AS_Upgrade.exe is the upgrade file that you want to install
Once the install is finished you can exit or install additional upgrades.
@wesleybuchanan in this case it's about third party device description files (extension .xdd). For example the file FBE.0000001D_CPX_FB40 refers to a FESTO Powerlink compatible bus node. These are xml files that are imported via the 3rd Party Device Manager. Is it possible to simply mount the corresponding folder into the container from a bare-metal AS installation?
@zeehans Please check the contents of the "C:\ProgramData\BR\AS412\Hardware\Modules" of your local installation. You should see the 3e party FBE.0000001D_CPX_FB40 subfolder. When you copy this to the docker installation it should build correctly.
@zeehans can you confirm that copying the FBE.0000001D_CPX_FB40 folder into your docker container allowed you to build your project succesfully?
We plan on updating the package with this information shortly.
@wesleybuchanan we haven't got around to trying that yet. My colleague who is tasked with building the docker image is still on leave at the moment. I'll let you know as soon as I know more.
@wesleybuchanan my colleague got around to testing your suggestion. We can build the docker image now and the error messages relating to the description files disappear but when we try to compile a configuration, the build just hangs after a while and never completes.
In the container we build a configuration using the following commands:
As base images we tried:
We built container images using AS Versions 4.11 and 4.12. The behaviour described above occurs in all build setups and the build hangs here:
Generating BR-Module "Visu.br" ...
I attached two build logs:
We'd be grateful if you could provide some help as to how to proceed.
Hello,
We're attempting to use a Docker container to build and test our projects/libraries. We've successfully built the example project provided in the Unit Test Guide using the container.
This process is performed once on a host machine (with a GUI) and once within a Docker container, both of which have the same AS/Upgrade/Runtimes installed:
While the example project builds successfully in both environments, we encounter an error when attempting to build a different project that includes the mappFramework within the container:
Error: "The system cannot find the path specified."
The build completes successfully on the host, but fails in the container. The screenshot illustrates the successful build on the left and the failed container build in Docker Desktop.
The error message is vague, and we’re not sure how to proceed.
Has anyone encountered a similar issue or have any ideas on how to resolve this?
Thank you!
For our CI pipelines it would be really useful to be able to use Docker containers to build and deploy PLC images (in our case RUC and PIPs). Right now we use a shell executor that uses the BR command line tooling to sequentially build our deploy images however it would be really nice to be able to parallelise this process. We are building about 15 different configurations and it takes quite a while to build. If we were able to build each configuration in an isolated container we could easly parallelise this process. We tried pulling relevant tools and dependencies into a Docker Windows container but never got it to build. Surely we are missing some steps here. Is it possible to get instructions as to how to build such a container, preferably a Dockerfile?