DevOps with Servoy
Easily automate your developer operations by using GitHub actions or Bitbucket Pipelines to create pipelines that build your Servoy WAR export files for you. Hook up to thousands of other actions in the GitHub Marketplace or public Pipes in Bitbucket to fully automate your deployments, generate slack notifications, and more. Or, just keep it simple and upload the generated WAR to your Java server. The choice is yours, and you are in full control!
How it Works
Setup the Action
Watch it Build
Deploy It
Example Configurations
GitHub Actions are YAML files setup in your git repo. See an overview here or read more about creating actions here.
We've also setup a sample project showing a small Servoy solution setup with our devops tools to automatically generate the war and upload it via SFTP or do a full deployment via a Tomcat docker image pushed to your docker container registry. You can check that sample out here.
For Bitbucket Pipelines, the documentation is here and you can view the example project here. The Pipe is available here.
- Build the WAR
- WAR + FTP Upload
- WAR + S3 Upload
- WAR + Azure Upload
- Tomcat Docker Image Deploy
- WAR Auto-Deploy
Build the WAR on every commit to ensure the latest commit didn't break anything basic. The WAR is discarded immediately after generated.
name: Build WAR File on: push: branches: - develop jobs: build: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2 - name: Servoy Build uses: itechpros/servoy-war-builder@v1 with: servoy-version: 2022.03.4.3746 api-key: ${{ secrets.ALL_PRODUCTS_PACK_KEY }} solution-name: cloudSampleSolution default-admin-user: ${{ secrets.DEFAULT_ADMIN_USER }} default-admin-password: ${{ secrets.DEFAULT_ADMIN_PASSWORD }} properties-file: prop_files/servoy.build.properties dbi: true
On commit message containing "[war]", build the WAR and upload it to an SFTP server.
name: Build War and FTP Upload on: push: branches: - develop jobs: build: runs-on: ubuntu-latest if: "contains(github.event.head_commit.message, '[war]')" steps: - name: Checkout uses: actions/checkout@v2 - name: Servoy Build uses: itechpros/servoy-war-builder@v1 with: servoy-version: 2022.03.4.3746 api-key: ${{ secrets.ALL_PRODUCTS_PACK_KEY }} solution-name: cloudSampleSolution default-admin-user: ${{ secrets.DEFAULT_ADMIN_USER }} default-admin-password: ${{ secrets.DEFAULT_ADMIN_PASSWORD }} properties-file: prop_files/servoy.build.properties dbi: true war-file-name: myapp.war - name: SFTP Upload uses: wlixcc/SFTP-Deploy-Action@v1.2.4 with: username: ${{ secrets.FTP_USER }} password: ${{ secrets.FTP_PASS }} server: 'mycompany.com' local_path: 'myapp.war' remote_path: '/path/on/ftp/server'
On commit message containing "[war]", build the WAR and upload to Amazon S3 bucket
name: "Build and Upload" on: push: branches: - develop jobs: build: runs-on: ubuntu-latest if: "contains(github.event.head_commit.message, '[war]')" steps: - name: Checkout uses: actions/checkout@v2 - name: Servoy WAR Build uses: itechpros/servoy-war-builder@v1 with: servoy-version: 2023.03.2.3844 api-key: License Key from us solution-name: MySolution default-admin-user: admin default-admin-password: password dbi: true extras-folder: ServoyDeveloperExtras - name: Upload file to bucket uses: koraykoska/s3-upload-github-action@master env: FILE: MySolution.war S3_ENDPOINT: 's3.us-east-1.amazonaws.com' S3_BUCKET: ${{ secrets.S3_BUCKET }} S3_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY_ID }} S3_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET_ACCESS_KEY }}
On commit message containing "[war]", build the WAR and upload to Azure Blob Storage
name: "Build and Upload" on: push: branches: - develop jobs: build: runs-on: ubuntu-latest if: "contains(github.event.head_commit.message, '[war]')" steps: - name: Checkout uses: actions/checkout@v2 - name: Servoy WAR Build uses: itechpros/servoy-war-builder@v1 with: servoy-version: 2023.03.2.3844 api-key: License Key from us solution-name: MySolution default-admin-user: admin default-admin-password: password dbi: true extras-folder: ServoyDeveloperExtras - name: Upload WAR to Azure uses: LanceMcCarthy/Action-AzureBlobUpload@v2 with: connection_string: ${{ secrets.AZURE_CONNECTION_STRING }} container_name: war-exports source_folder: MySolution.war destination_folder: export fail_if_source_empty: true delete_if_exists: true
On commit message containing "[dockerImage]", build the WAR and bundle it inside of a new Tomcat docker image, then tag and push that to your docker registry of your cloud hosting provider (DigiitalOcean example below). Then you can have that auto-deploy, or manually deploy by choosing the tag to deploy in your cloud hosing console.
name: Build War and Tomcat Docker Image on: push: branches: - develop jobs: build: runs-on: ubuntu-latest if: "contains(github.event.head_commit.message, '[dockerImage]')" steps: - name: Checkout uses: actions/checkout@v2 - name: Servoy Build uses: itechpros/servoy-war-builder@v1 with: servoy-version: 2022.03.4.3746 api-key: ${{ secrets.ALL_PRODUCTS_PACK_KEY }} solution-name: cloudSampleSolution default-admin-user: ${{ secrets.DEFAULT_ADMIN_USER }} default-admin-password: ${{ secrets.DEFAULT_ADMIN_PASSWORD }} properties-file: prop_files/servoy.build.properties dbi: true war-file-name: myapp.war - name: Docker Login uses: docker/login-action@v2 with: registry: registry.digitalocean.com username: ${{ secrets.DIGITALOCEAN_TOKEN }} password: ${{ secrets.DIGITALOCEAN_TOKEN }} - name: Tomcat Image Build uses: itechpros/servoy-tomcat-builder@main with: tomcat-version: 9 java-version: 17 war-file: myapp.war image-name: registry.digitalocean.com/svytest/servoy-tomcat
On commit message containing "[war]", build the WAR and deploy it to Tomcat server by connecting to VPN, stopping tomcat, SFTP the WAR, and start tomcat backup.
name: "Build and Auto-Deploy" on: push: branches: - develop jobs: build: runs-on: ubuntu-latest if: "contains(github.event.head_commit.message, '[war]')" steps: - name: Checkout uses: actions/checkout@v2 - name: Servoy WAR Build uses: itechpros/servoy-war-builder@v1 with: servoy-version: 2023.03.2.3844 api-key: License Key from us solution-name: MySolution default-admin-user: admin default-admin-password: password dbi: true extras-folder: ServoyDeveloperExtras - name: VPN Connect uses: aduriseti/ovpn3-connect-action@v1 id: connect_vpn with: ovpn-config: ${{ secrets.OPENVPN_CONFIG }} vpn-user: ${{ secrets.OPENVPN_USER }} vpn-pass: ${{ secrets.OPENVPN_PASS }} - name: SSH to stop tomcat #Disable requireetty on the remote host for this to work uses: tiyee/action-ssh@v1.0.1 with: host: yourhost.com port: 22 username: centos privateKey: ${{ secrets.KEY_PEM }} command: 'sudo systemctl stop tomcat' - name: SFTP the war uses: wlixcc/SFTP-Deploy-Action@v1.2.4 with: server: yourhost.com port: 22 username: centos ssh_private_key: ${{ secrets.KEY_PPM }} local_path: 'MySolution.war' remote_path: '/usr/share/tomcat/webapps' sftp_only: true - name: SSH to start tomcat uses: tiyee/action-ssh@v1.0.1 with: host: yourhost.com port: 22 username: centos privateKey: ${{ secrets.KEY_PPM }} command: 'sudo systemctl start tomcat' - name: kill vpn if: always() run: | sudo pkill openvpn
Frequently Asked Questions
- Standardized Package. You know its built the exact same way each time.
- Save Time. Let the builds happen in the background instead of waiting on them.
- Automate Tests. Hook into your testing frameworks to run any tests needed after the build.
- Deploy Automatically. After build, deploy the war file any way you want.
- Integrations. Hook into the thousands of GitHub actions available like Slack or Teams notifications to let you know the success of your builds..
You can also have the builds done on your own infrastructure (see self hosted runners).
If you choose to store your WAR files as GitHub releases, you'll also want to add the $5 monthly add-on for 50GB of extra storage.
General GitHub account pricing is available here.
Our DevOps package is just a set of tools to help you simplify your WAR builds or to build your own pipeline. They are aimed at customers that want more control of their pipeline and hosting, while bringing their own Servoy licenses. For example, if you want to deploy within your own infrastructure or a different cloud provider. If you prefer that level of control, our DevOps tools are a great time saver to help you build your own custom pipeline. It does require additional technical know-how on your part, so you'll need to be comfortable with setting up the configurations, reviewing logs, etc. We can also setup your custom pipeline for you under our consulting services.
We've also setup a sample project showing a small Servoy solution setup with our devops tools to automatically generate the war and upload it to a GitHub release. You can check that sample out here.
For Bitbucket, there is documentation on usage at https://support.servoycomponents.com/portal/en/kb/articles/servoy-war-builder-bitbucket-pipelines The example repo showing Servoy WAR build with SFTP is available at https://bitbucket.org/itechpros/servoy-war-builder-examples/src/master/
Buy Now
DevOps Only
Yearly Subscription Price.
Single Developer or Site
- 90 Day Trial: Free
- Consultant/Reseller: Contact Us
All Products Pack
All Products Pack. Get access to all our components for 1 yearly price.
- 30 Day Trial: Free
- Single Developer: $800
- Site: $1,250
- Consultant/Reseller: Contact Us