Fortinet Document Library

Version:


Table of Contents

User Guide

Download PDF
Copy Link

Configuring FortiWeb Cloud with Jenkins

The following example demonstrates how to use Jenkins to perform simple configuration changes on FortiWeb Cloud. It requires the following:

  • FortiWeb Cloud 20.2.d or later
  • Jekins: This example uses Jekins 2.222.3+.
To onboard an application with Jenkins, follow the steps below:
  1. Log in to your Jenkins account.
  2. Click New Item.
  3. Name the item and select Pipeline, then click OK.

  4. Select This project is parameterized.

    image-20200709100410351

  5. In String Parameter, enter user in Name, then enter your FortiWeb Cloud's account name in Default Value. The account should have write privilege on FortiWeb Cloud.

    image-20200709100715664

  6. In Password Parameter, enter password in Name, then enter the password of the specified account in Default Value.

    image-20200709100915321

  7. In String Parameter, enter application_name in Name, then enter a name for your application. It will be displayed on FortiWeb Cloud's GUI to identify your application.

    image-20200709104600622

  8. In String Parameter, enter domain_name in Name, then enter your application's domain name in Default Value.

    image-20200709104613504

  9. In Multi-line String Parameter, enter extra_domains in Name, then enter the domain names if your application has multiple domains.

    image-20200709104907392

  10. In String Parameter, enter origin_server_ip in Name, then enter your origin server's IP address in Default Value.

    image-20200709105931688

  11. In String Parameter, enter HTTP in Name, then enter the port number used for HTTP service in Default Value.You must enter 80 as the default value.

    image-20200709110138628

  12. In String Parameter, enter HTTPS in Name, then enter the port number used for HTTPS service in Default Value. You must enter 443 as the default value.

    image-20200709110402704

  13. In String Parameter, enter origin_server_service in Name, then enter your origin server's service type in Default Value. You must input HTTP or HTTPS as the default value.

    image-20200709110801537

  14. In String Parameter, enter origin_server_port in Name, then enter your origin server's listening port in Default Value. You can input 80 for HTTP or 443 for HTTPS as the default value.

    image-20200709143415791

  15. In Boolean Parameter, enter cdn in Name, then enable this option if you want your application to be accelerated in the global network.

    image-20200709143808783

  16. In Boolean Parameter, enter block in Name, then enable this option if you want FortiWeb Cloud to block the attacks and abnormal traffic.

  17. In String Parameter, enter template in Name, then enter the name of the template if you want your application to inherit configuration from the template.

    image-20200709144322839

  18. Specify the repositories in the pipeline. The repository URL is https://github.com/fortinet/fortiwebcloud-jenkins and the script path is "jenkins/CreateApp". Click Save to finish the setup.

    image-20200709144821402

  19. Now you can schedule the build.

    image-20200709145129843

  20. Review the configuration before running the build. Click Build.

    image-20200709145212854

  21. If nothing is wrong, you will see the successful operation via Console Output.

    image-20200709145938403

To delete app via Jenkins, follow the steps below:
  1. Click New Item to add a new item.

  2. Name the item and select Pipeline, then click OK.

    image-20200709150524124

  3. Select This project is parameterized.

    image-20200709150637484

  4. In String Parameter, enter user in Name, then enter your FortiWeb Cloud's account name as its default value.

    image-20200709150931527

  5. In Password Parameter, enter password in Name, then enter the password of the specified account in Default Value.

    image-20200709151025194

  6. In String Parameter, enter application_name in Name, then enter the name of your application to be deleted.

    image-20200709151059466

  7. Specify the repositories in the pipeline. The repository URL is https://github.com/fortiweb/FortiwebCloudJenkins and the script path is "jenkins/DelApp". Then click Save to finish the setup.

    image-20200709151152583

  8. Run the build. If nothing is wrong, then the delete process will be output and your application will be deleted from FortiWeb Cloud.

Configuring FortiWeb Cloud with Jenkins

The following example demonstrates how to use Jenkins to perform simple configuration changes on FortiWeb Cloud. It requires the following:

  • FortiWeb Cloud 20.2.d or later
  • Jekins: This example uses Jekins 2.222.3+.
To onboard an application with Jenkins, follow the steps below:
  1. Log in to your Jenkins account.
  2. Click New Item.
  3. Name the item and select Pipeline, then click OK.

  4. Select This project is parameterized.

    image-20200709100410351

  5. In String Parameter, enter user in Name, then enter your FortiWeb Cloud's account name in Default Value. The account should have write privilege on FortiWeb Cloud.

    image-20200709100715664

  6. In Password Parameter, enter password in Name, then enter the password of the specified account in Default Value.

    image-20200709100915321

  7. In String Parameter, enter application_name in Name, then enter a name for your application. It will be displayed on FortiWeb Cloud's GUI to identify your application.

    image-20200709104600622

  8. In String Parameter, enter domain_name in Name, then enter your application's domain name in Default Value.

    image-20200709104613504

  9. In Multi-line String Parameter, enter extra_domains in Name, then enter the domain names if your application has multiple domains.

    image-20200709104907392

  10. In String Parameter, enter origin_server_ip in Name, then enter your origin server's IP address in Default Value.

    image-20200709105931688

  11. In String Parameter, enter HTTP in Name, then enter the port number used for HTTP service in Default Value.You must enter 80 as the default value.

    image-20200709110138628

  12. In String Parameter, enter HTTPS in Name, then enter the port number used for HTTPS service in Default Value. You must enter 443 as the default value.

    image-20200709110402704

  13. In String Parameter, enter origin_server_service in Name, then enter your origin server's service type in Default Value. You must input HTTP or HTTPS as the default value.

    image-20200709110801537

  14. In String Parameter, enter origin_server_port in Name, then enter your origin server's listening port in Default Value. You can input 80 for HTTP or 443 for HTTPS as the default value.

    image-20200709143415791

  15. In Boolean Parameter, enter cdn in Name, then enable this option if you want your application to be accelerated in the global network.

    image-20200709143808783

  16. In Boolean Parameter, enter block in Name, then enable this option if you want FortiWeb Cloud to block the attacks and abnormal traffic.

  17. In String Parameter, enter template in Name, then enter the name of the template if you want your application to inherit configuration from the template.

    image-20200709144322839

  18. Specify the repositories in the pipeline. The repository URL is https://github.com/fortinet/fortiwebcloud-jenkins and the script path is "jenkins/CreateApp". Click Save to finish the setup.

    image-20200709144821402

  19. Now you can schedule the build.

    image-20200709145129843

  20. Review the configuration before running the build. Click Build.

    image-20200709145212854

  21. If nothing is wrong, you will see the successful operation via Console Output.

    image-20200709145938403

To delete app via Jenkins, follow the steps below:
  1. Click New Item to add a new item.

  2. Name the item and select Pipeline, then click OK.

    image-20200709150524124

  3. Select This project is parameterized.

    image-20200709150637484

  4. In String Parameter, enter user in Name, then enter your FortiWeb Cloud's account name as its default value.

    image-20200709150931527

  5. In Password Parameter, enter password in Name, then enter the password of the specified account in Default Value.

    image-20200709151025194

  6. In String Parameter, enter application_name in Name, then enter the name of your application to be deleted.

    image-20200709151059466

  7. Specify the repositories in the pipeline. The repository URL is https://github.com/fortiweb/FortiwebCloudJenkins and the script path is "jenkins/DelApp". Then click Save to finish the setup.

    image-20200709151152583

  8. Run the build. If nothing is wrong, then the delete process will be output and your application will be deleted from FortiWeb Cloud.