AgroScout Improves Development and DevOps with Oracle Cloud Native Services
February 10, 2020 | 5 minute read
AgroScout is a startup in the agricultural technology (agritech) sector dedicated to the early detection of pests and disease in field crops. And, it’s a prime example of a cutting-edge company that’s using Oracle Cloud Native Services to migrate their application to Kubernetes and deliver an automated deployment pipeline.
Cloud native technologies are all the rage right now. Customers can choose from a wide range of options to implement both their application platform and the continuous integration/continuous delivery technologies (CI/CD) used to deliver those applications. Now up and running, the AgroScout development team enjoys easier management of their application with Kubernetes and a streamlined CI/CD platform, better performance from Oracle’s Generation 2 Cloud, and much more.
Oracle Cloud Native Services
Oracle Cloud Native Services include services for containers, serverless functions, streaming (with compatibility for Apache Kafka), infrastructure automation (with compatibility for Terraform), APIs, and associated monitoring and notifications capabilities. A relatively recent addition to the Oracle Cloud Infrastructure portfolio, these services have seen momentum over the last year. Adopters include scientific organizations, healthcare organizations, large financial services companies, innovative AI-centric startups, logistics and transportation companies, and government entities. You can get more details about these services and their adoption from the update that we posted in November 2019.
Kubernetes was chosen as the application platform for the AgroScout project, provided by the Oracle Container Engine for Kubernetes service. Container Engine for Kubernetes is a developer-friendly and enterprise-ready managed Kubernetes service for running highly available clusters. New clusters can be created through the Console, API, CLI, or Terraform, with a choice of virtual machine or bare metal servers for the worker nodes. Container Engine for Kubernetes uses standard Kubernetes; all the tools, such as kubectl, Helm, and the dashboard, are available for a pure Kubernetes user experience and portability across platforms.
Any container technology relies on images and requires a registry for image storage and access. Oracle Cloud Infrastructure includes a managed container registry, Oracle Cloud Infrastructure Registry, which is Docker v2 compatible.
The solution also required tooling to build and deploy AgroScout’s code as pods on a Kubernetes cluster. This final piece was provided by our CI/CD platform, which provides prebuilt integration for Kubernetes and container registries that can be used to build code or container images and then deploy them to Kubernetes or other platforms.
The solution had the following goal: When a developer committed code changes to the source control system, this action would automatically trigger a build that created a Docker container image that was pushed to a repository in Registry. A further automated step would deploy this image as a Kubernetes deployment, along with the Kubernetes services needed to expose it to the outside world.
Fortunately, our CI/CD platform integrates with most popular hosted Git offerings, so AgroScout could continue to use its BitBucket Git repositories, minimizing the impact on its development workflow. Each microservice has a dedicated Git repository, and each of these is associated with a build pipeline, which means that each microservice could be built and deployed in isolation. Now, commits to the source code trigger the first step of the associated pipeline, which is to build the application, in this case using Node.js, and create a Docker image.
The CI/CD pipeline can use native steps to build an image or use a standard Dockerfile stored in Git. We chose the latter for portability and readability. After the image is created, a second step pushes the image to a repository hosted in Registry by using the pipeline’s native capabilities. One requirement was to deploy the application to multiple Kubernetes environments, depending on which branch in Git the developer was working on. Here, the pipeline’s ability to branch deployment workflows allowed us to create a set of Kubernetes manifest files for each specified environment based on the Git branch the developer was working on.
A final step deploys the application to the correct Kubernetes cluster. The application’s Kubernetes deployments are exposed to the outside world through an ingress controller that uses the integration of the Oracle Cloud Infrastructure Load Balancing service into Container Engine for Kubernetes. This provides a highly available public load balancer to allow internet access to the customer’s website.
The application also includes a set of batch jobs to be run periodically. These jobs can be built by using the previous approach and deployed by our CI/CD platform to the same Container Engine for Kubernetes clusters as Kubernetes cronjobs. Periodic maintenance jobs, backups, and processing of image data use this pattern, with the cronjob launching a job at the specified interval.
The machine learning side of the application uses of Jupyter Notebook, and an image including the Notebook and all required files is built and deployed via build pipelines on Oracle Cloud Infrastructure.
We’re happy to report that since this solution was implemented, the development team enjoys easier management of their application with Kubernetes and a streamlined CI/CD platform, and better performance from Oracle Cloud for their microservices and GPU-based machine learning. Scalability and resilience have been improved by using an Oracle native load balancer to forward traffic to Kubernetes services. Integration with Slack ensures that the team is always notified of the state of each build. The end solution on Oracle Cloud Infrastructure has freed up developer time to add new features and bug fixes for their growing customer base.
AgroScout has seen significant improvements in three main areas:
- Performance: The speed of downloading thousands of pictures of crops was reduced from minutes to a few seconds. Tagging, viewing, and working with pictures is much faster, which improves the overall user experience.
- Agility: Oracle Solution Center engineers and Oracle Cloud Infrastructure technology have made the process of committing code, as well as building and delivering new releases automatically, fast and simple. Prior manual processes took at least a day and included no capability for notifications. The DevOps team now gets notified right away on their cell phones and can fix bugs much faster.
- Scalability: With Oracle Cloud, AgroScout can scale dynamically, based on demand. They expect to have tens of thousands of users in the next 2–5 years.
Try Oracle Cloud for yourself and experience Container Engine for Kubernetes, Registry, and other services. Also see the following resources:
- Free workshops on PluralSight.com: Get 12 months of free access to Oracle Cloud courses
- Oracle Cloud Infrastructure training (for learners of all levels)
- Learn more about Oracle Cloud Native Services
More about AgroScout
AgroScout surveys fields by using autopiloted drones with cameras. It then processes, detects, and classifies any issues with the crops before recommending treatment. The company relies on graphical processing unit (GPU) based machine learning and a set of microservices backed by a SQL database.
Their initial technology stack was based on Heroku and AWS. The small development team found that the time they spent managing this stack was detracting from their ability to deliver new features. In addition to being hard to maintain, their existing solution suffered from poor performance and was difficult to scale. Also, the outcome and status of new deployments wasn’t immediately clear.