Art and automation living together
In computer science, things can be divided into two categories:
- things that can be done with your own style;
- things that must always be done the same way.
The first category includes all activities related to the discipline of programming: from conception to functional analysis, from coding to test strategies.
The second includes compilation methods, build construction, deployment of a software system, infrastructure operations and the like.
Similarly, container and microservices are very cost-effective technologies if you always use them in the same way. All production issues must be automated because they often become a lock-in factor.
Do you have masterfully written source code and want to run it as a web application on the Internet, but have neither skill nor desire to turn it into a docker image, equip your orchestrator, use HELM charts, start the deployment, and so on? Then it’s time to automate.
It is a matter of fact that IBM CodeEngine offers the most modern automation technology available today.
Furthermore, even if it is difficult to quantify, the automatic interruption of support to inactive functions reduces pollution. Let’s walk through Kubernetes and IKS to get from code to CodeEngine.
But before you move ahead, don’t forget to check IBM’s on-demand content platform, where you can learn many new skills and watch the live recording of the Data and AI Forum, and join the Call for Code Global Challenge 2021!
A quick recap about Kubernetes
Kubernetes is an orchestration tool that allows you to run containerized workloads in the Cloud. Code, organized in a set of microservices, or functions, is written according to the serverless provisioning paradigm.
Using the serverless approach, the necessary hardware and software environments are provisioned in a well-structured way, easy to scale, maintain, and bill.
Kubernetes can be run in many working environments. IBM offers it within a full, production-ready environment, running on the IBM Cloud with all its rich-featured services.
The smallest, most basic deployable objects in Kubernetes are named Pods. A pod represents a single instance of a running process in a Linux cluster. Each pod hosts one or more containers, managed as a single entity and sharing the same resources when a pod hosts multiple containers.
IBM Cloud Kubernetes Service is a managed offering ideal for creating a Kubernetes cluster of computer hosts to deploy and manage containerized apps on IBM Cloud. A certified Kubernetes solution, it provides intelligent scheduling, self-healing, horizontal scaling and more.
Learn to deploy and operate a Kubernetes cluster on IBM Cloud — at no cost and without configuration or downloads.
IKS simplifies container orchestration while leaving all the necessary steps in your hands. IKS has subsequently been heavily automated, becoming the IBM Cloud Code Engine.
Serverless for large organizations
IBM Cloud was conceived to offer simultaneous computational power and technological innovation to every project in the field of digital transformation.
There are various provisioning methods (bare metal, containers, and serverless), allowing the system to adapt to various business models and still produce big savings.
In particular, the serverless paradigm reduces the cost of some components and keeps all of these under control. The related Cloud infrastructure is managed by the provider, in this case, IBM.
Large organisations in Italy are still not fully aware of the range of possibilities that can be exploited through full serverless implementation. Northern Europe, and the aeronautics and banking industries in particular are more closely invested in this point of view.
The Internet of Things arena is also more ready to adhere to new paradigms.
The limits of serverless 1.0
The current paradigm could be called “serverless 1.0”. This system is not good for everything, but does handle event-driven systems. No serverless system runs 24h as a web app or mobile backend does.
A strong advantage can be gained in legacy solutions for massively-parallel or high-intensity computing: it happens only for something that is after an “if”.
The Clusterless approach
Serverless systems are often limited by duration, size, or environment. This disadvantage has been cancelled out by the adoption of clusters, while still maintaining the same advantages offered by serverless systems (pay-as-you-go).
Deploying on containers brings with it great advantages, especially for systems engineering, e.g., being able to partition large monoliths, or inoculating agile practices (which is not possible on monoliths).
Nonetheless, even containers have problems: developers love them, but from a systems point of view they require significant steps down a generally torturous road.
IBM wanted to overcome these limitations: the challenge of containers is to be able to use them without having to learn how to use them, as if they were a taxi. The proposed solution is clusterless and is called Cloud Engine.
The IBM Cloud CodeEngine
IBM’s simplified offer toward a (hybrid) Cloud environment is known as Cloud Engine. It runs containers, if not directories with code, without any preliminary containerization, in just a few mouse clicks.
IBM Cloud Engine produces code directly in an orchestrated environment that is completely transparent to the developer. Once the application is complete, with a few clicks deployment is achieved in seconds.
Anyone who knows how to program is therefore able to make software available without other skills. Batches can also be pushed into microservices and activated on-demand only.
When it is generally available, Code Engine will also be able to exploit other possibilities offered by the satellites of the IBM environment.
Scaling to zero
Savings can be found in many different aspects of the costs of software execution. If microservices coming from a once-monolithic system are not used, they are shut down and therefore have no cost. The action will be reactivated as soon as a new request arrives.
These are not rare circumstances: for example, even applications such as social networks have many inactive services most of the time. We call this part of the new business model the “scaling to zero” approach.
Creating your first CodeEngine app
Create your first Code Engine app by using the helloworld image from the public Docker Hub.
- Open the Code Engine console.
- Select Start Creating from the Run a Container image.
- Select Application.
- Enter a name for the application. Use a name for your application that is unique within the project HelloWorld
- Select a project from the list of available projects. You can also create a new project. Note that you must have a selected project to deploy an app.
- Select Run a Container image and specify docker.io/ibmcom/helloworld for the image reference. For this example, you do not need to modify the default values for environment variables or runtime settings.
- Click Create.
- After the application status changes to Ready, you can test the application by clicking Send a request in the Test pane. To open the application on a web page, click the Open application URL.
- To open the application in a web page, click Open application URL.
This is the output:
Configure tasks with the CLI
Deploying your first application to CodeEngine and testing it out is that simple. Now, go to the Tutorial: Deploying applications to try out more options for applications.
Beyond the CodeEngine framework, the generated software execution offers interaction through a command line.
A typical example is to schedule execution time using the CRONTAB command (A legacy from the Unix operating system).
A reference of the crontab syntax in the proposed commands (‘0 0 * * *’ means: every day at midnight) is this:
A field may be an asterisk (*), which always stands for “first-last”.
Take the lead with leaders
Writing code is both an art and a source of satisfaction. On the other hand, deploying on the internet, creating docker images, building clusters of containers, managing orchestrators and registers are all repetitive activities.
Getting your app online takes a lot of time and requires a lot of skills. Furthermore, apps spend resources in the Cloud even if they are not used by anyone.
CodeEngine is the technology that allows your apps to be put into operation on the internet starting from the source code. With inbuilt scaling to zero, you pay only when the app and its services are used.
Ferdinando Gorga, IBM Tech Representative, explained in full what’s going on with ICT automation, a set of knowledge and tools that leverage the company’s programming skills, during the IBM DevCast on May 27, 2021. Check out the full video recording!
You can learn these skills by watching the live recording of the Data and AI Forum on IBM’s on-demand content platform, along with many more.
The most important foundation stone of technology in ICT automation is Kubernetes. This is one of the building blocks that enable solutions to reach everyone those in need around the world.
IBM is part of the Call For Code Challenge 2021, a worldwide event in which teams compete to create a solution from scratch, focusing on one of three fields: food, water, and production.
The world needs a global process of re-engineering to keep our planet – and the human race – alive.
IBM Call for Code Global Challenge 2021 is a great way to contribute to improving the Earth’s health – and perhaps a developer’s health and wealth too. You can make a difference at a planetary level both with your team and as a contributing professional. Don’t wait: Join the Challenge TODAY!