Designing Your First App in Kubernetes, Part 2: Setting up Processes

I reviewed the basic setup for building applications in Kubernetes in part 1 of this blog series. In this post, I’ll explain how to use pods and controllers to create scalable processes for managing your applications.
Processes as Pods & Controllers in Kubernetes
The heart of any application is its running processes, and in Kubernetes we fundamentally create processes as pods. Pods are a bit fancier than individual containers, in that they can schedule whole groups of containers, co-located on a single host, which brings us to our first decision point:
Decision #1: How should our processes be arranged into pods?
The original idea behind a pod was to emulate a logical host – not unlike a VM. The containers in a pod will always be scheduled on the same Kubernetes node, and they’ll be able to communicate with each other via localhost, making pods a good representation of clusters of processes that need to work together closely. 
A pod can contain one or more containers, but containers in the pod must scale together.
But there’s an important consideration: it’s not possible to scale individual containers in a pod separately from each other. If you need to scale your application up, you have to add more pods, which come with copies of every container they include. Factors such as which application components will scale at similar rates, which ones will not, and which ones should reside on the same host will factor into how you arrange processes in pods.
Thinking about our web app, we might start by making a pod containing only the frontend container; we want to be able to scale this frontend independently from the rest of our application, so it should live in its own pod.
On the other hand, we might design another pod that has one container each for our database and API; this way, our API is guaranteed to be able to talk to our database on the same physical host, eliminating network latency between the API and database and maximizing performance. As noted, this comes at the expense of independent scaling; if we schedule our API and database containers in the same pod, every time we want a new instance of our database container, it’s going to come with a new instance of our API.
Case specific arguments can be made for or against this choice: Is API-to-database latency really expected to be a major bottleneck? Could it be more important to scale your API and database separately? Final decisions may vary, but the same decision points can be applied generically to many applications.
Now that we have our pods planned out (one for the frontend and one for the API-plus-database combo), we need to decide how to manage these pods. We virtually never want to schedule pods directly (called ‘bare pods’); we want to take advantage of Kubernetes controllers, which will automatically reschedule failed pods, give us some simple influence on how and where our pods are scheduled, and give us some functionality on how to update and maintain those pods. There are at least two main types of controllers we need to decide between:
Decision #2: What kind of controller should we use for each pod: a deployment or a daemonset?

Deployments are the most common kind of controller, typically the best choice for stateless pods which can be scheduled anywhere resources are available.
DaemonSets are appropriate for pods meant to run one per host; these are typically used for daemon-like processes, like log aggregators, filesystem managers, system monitors or other utilities that make sense to have exactly one of on every host in your Kubernetes cluster.

Most, but not all, pods are best scheduled by one of these two controllers, and of them deployments make the large majority. Since neither of our web app components make sense as cluster-wide daemons, we would schedule both of them as deployments. If later we wanted to deploy a logging or monitoring appliance, a daemonSet would be a common pattern to ensure it runs on every node in the cluster.
Now that we’ve decided on how to arrange our containers into pods and how to manage our pods using controllers, its time to write some Kubernetes yaml to capture these objects; many examples of how to do this are available in the Kubernetes documentation and Docker’s Training material.
I strongly encourage you to define your applications using Kubernetes yaml definitions, and not imperative kubectl commands. As I mentioned in the first post, one of the most important aspects of orchestrating a containerized application is shareability, and it is much easier to share a yaml file you can check into version control and distribute, rather than a series of CLI commands that can quickly become hard to read and hard to keep track of.
Checkpoint #2: write Kubernetes yaml to describe your controllers and pods.
Once you have that yaml in hand, now’s a good time to create your deployments and make sure they all work as expected: individual containers in pods should run without crashing, and containers inside the same pod should be able to reach each other on localhost.
Advanced Topics
Once you’ve mastered the pods, deployments, and daemonSets mentioned above, there are a few deeper topics you can approach to enhance your Kube applications even further:

StatefulSets are another kind of controller appropriate for managing stateful pods; note these require an understanding of Kube services and storage (discussed below).
Scheduling affinity rules allow you to influence and control where your pods are scheduled in a cluster, useful for sophisticated operations in larger clusters.
Healthchecks in the form of livenessProbes are an important maintenance tool for your pods and containers, that tell Kube how to automatically monitor the health of your containers, and take action when they become unhealthy.
PodSecurityPolicy definitions allow an added layer of security for cluster administrators to control exactly who and how pods are scheduled, commonly used to prevent the creation of pods with elevated or root privileges.

To learn more about Kubernetes pods and controllers, read the documentation:

Kubernetes pods
Kubernetes controllers

You can also check out Play with Kubernetes, powered by Docker.
We will also be offering training on Kubernetes starting in early 2020. In the training, we’ll provide more specific examples and hands on exercises. To get notified when the training is available, sign up here:
Get Notified About Training

Designing Your First App in #Kubernetes, Part 2 — Processes as Pods and ControllersClick To Tweet

The post Designing Your First App in Kubernetes, Part 2: Setting up Processes appeared first on Docker Blog.
Quelle: https://blog.docker.com/feed/

New Azure blueprint enables SWIFT Connect

This morning at the SIBOS conference in London we announced how our new Azure Blueprint is being introduced by Microsoft in conjunction with the recent efforts to enable SWIFT connectivity in the cloud. It supports our joint customers in compliance monitoring and auditing of SWIFT infrastructure for cloud native payments, as described on the Official Microsoft Blog. 

SWIFT is the world’s leading provider of secure financial messaging services used and trusted by more than 11,000 financial institutions in more than 200 countries and territories. Today, enterprises and banks conduct these transactions by sending payment messages over the highly secure SWIFT network which leverages on-premises installations of SWIFT technology. SWIFT Cloud Connect creates a bank-like wire transfer experience with the added operational, security, and intelligence benefits the Microsoft Cloud offers.

Azure Blueprints is a free service that enables customers to define a repeatable set of Azure resources that implement and adhere to standards, patterns, and requirements. Azure Blueprints allow customers to set up governed Azure environments that can scale to support production implementations for large-scale migrations. Azure Blueprints include mappings for key compliance standards such as ISO 27001, NIST SP 800-53, PCI-DSS, UK Official, IRS 1075, and UK NHS. 

The new SWIFT blueprint maps Azure built-in polices to CSP's security controls framework, enabling financial service organizations to have agility in creating and monitoring secure and compliant SWIFT infrastructure environments.

The Azure blueprint includes mappings to:

Account management. Helps with the review of accounts of that may not comply with an organization’s account management requirements.
Separation of duties. Helps in maintaining an appropriate number of Azure subscription owners.
Least privilege. Audits accounts that should be prioritized for review.
Remote access. Helps with monitoring and control of remote access.
Audit review, analysis, and reporting. Helps ensure that events are logged and enforces deployment of the Log Analytics agent on Azure virtual machines.
Least functionality. Helps monitor virtual machines where an application white list is recommended but has not yet been configured.
Identification and authentication. Helps restrict and control privileged access.
Vulnerability scanning. Helps with the management of information system vulnerabilities.
Denial of service protection. Audits if the Azure DDoS Protection standard tier is enabled.
Boundary protection. Helps with the management and control of the system boundary.
Transmission confidentiality and integrity. Helps protect the confidentiality and integrity of transmitted information.
Flaw remediation. Helps with the management of information system flaws.
Malicious code protection. Helps the management of endpoint protection, including malicious code protection.

Information system monitoring. Helps with monitoring a system by auditing and enforcing logging across Azure resources

We are committed to helping our customers leverage Azure in a secure and compliant manner. Over the next few months, we will release new built-in blueprints for HITRUST, FedRAMP, and Center for Internet Security (CIS) Benchmark. If you have suggestions for new or existing compliance blueprints, please share them via the Azure Governance Feedback Forum.

Learn more about the SWIFT CSP blueprint in our documentation.
Quelle: Azure

Overcoming the challenges of hybrid multicloud IT management

Hybrid cloud environments have become the norm among most businesses. In our latest Voice of the Enterprise: Digital Pulse, Budgets and Outlook 2019 survey, we asked 916 IT professionals to describe their overall IT approach and strategy. Among the respondents, we found that

62 percent said they now use a hybrid IT environment with integrated on-premises systems and off-premises cloud/hosted resources
17percent said their IT environment is completely off-premises, distributed across various SaaS, IaaS and PaaS clouds
Nine percent are using a hybrid cloud with limited or no interoperability between the on-premises and off-premises environments
Four percent are building an on-premises environment only
Just eight percent claimed clouds are not an important part of their IT strategy.

It’s now safe to say that interoperable on-premises infrastructure and hybrid multiclouds are common enterprise IT architectures, and they are likely to remain so for several years to come. However, getting these distributed environments to operate efficiently and effectively to better serve the business needs of enterprises is another matter.
Navigating hybrid multicloud management
There is no industry standard for hybrid multicloud architecture or management. Workload placement across multiple distributed execution venues is highly subjective to each enterprise and depends on a range of factors including the value to risk ratio tied to workloads, lifecycle stages, usage patterns, application behavior characteristics, data criticality, data sovereignty, the price, performance and risk characteristics of various execution venues, and so on. So too, the hybrid offerings from cloud service providers vary. Each has well-designed and comprehensive hybrid cloud architectures, but they differ in their design, deployment and management models.
As workloads, data and processes shift across diverse and disparate execution venues (e.g., on-premises infrastructure, managed services, clouds), there will be a need for a new approach to hybrid multicloud management – one that requires a uniform means for provisioning, access control, capacity management, performance analysis, billing and cost control, among others. Enterprises will demand that IT vendors craft a holistic platform to allocate workloads strategically to the best execution venue, and do so while managing business continuity across hybrid IT architecture. This will drive the development of a new generation of cloud management technology we refer to as unified infrastructure management (UIM) platforms.
Tackling next-generation challenges with unified infrastructure management
To tackle the challenges of hybrid IT management, a unified infrastructure management platform needs to be able to answer two fundamental questions and execute upon the findings. The first: “Under what conditions do I put what workloads on what execution venues?” This requires an understanding of workload characteristics and the capabilities of execution venues (beyond cost) to intelligently map workloads to their best execution venues and to migrate, monitor and manage workloads across execution venues.
To manage data and logic placement across distributed architecture, the UIM must also be able to answer and execute upon the second question: “Do I move the logic to the data or the data to the logic?” For example, in the case of core/fog/edge IoT architecture, the issue is how to intelligently and dynamically choose and shift where logic is computed – i.e., in the core (cloud), in the fog (nodes), on the edge (devices) – and how to minimize data in motion.
Such decisions require detailed analysis of many complex variables beyond cost. We believe that next-generation unified infrastructure management platforms will gradually be equipped with various open source technologies to answer such questions and provide a means to execute the following capabilities:

Analyze and compare the economics (price and performance characteristics) of various execution venues.
Analyze workloads to determine their performance characteristics and operational requirements.
Automate the provisioning of compute, storage, network, security, application stacks and data.
Intelligently deploy workloads and services determined by economic analysis as well as any compliance policies required of on-premises infrastructure, managed services, and private and public clouds.
Intelligently redeploy workloads to other execution venues when venue or workload characteristics change.
Interoperate with, build and deploy container and microservices coding platforms to coordinate cloud services for automated iterations of application and workload deployments.
Manage security, identity authentication and access control for administrators, tenants and user accounts.
Provide financial metering, reporting and chargeback/viewback by cloud, tenant, user, application, compute and other consumption-based services.
Orchestrate events and manage runtime execution and performance of all venues, and enact policies to automate scaling, bursting, high availability and disaster recovery.
Maintain a service library that includes operating system images, databases, middleware, message busses, load balancers and servers.
Control and dynamically allocate network resources in response to the transmission, latency and security requirements of specific data and workloads.

Trusted IT and cloud-enabling technology vendors are now crafting such unified infrastructure management platforms. Going forward, unified infrastructure management platforms may also include and/or integrate with orchestration tools to execute and synchronize business processes that span execution venues, analytics that pave the way for predictive and prescriptive deterministic reasoning, and even autonomic self-healing capabilities empowered by machine learning and artificial intelligence (AI) technologies that can also expose insights for continuous improvement. Highly valued vendors will be those that embrace this opportunity and can ensure that the advantages and business agility promised of hybrid multicloud IT architecture indeed become reality. Additional insights and improved strategies are required to reap the full range of benefits of a true hybrid IT environment.
Learn more about hybrid and multicloud strategy for the enterprise.
The post Overcoming the challenges of hybrid multicloud IT management appeared first on Cloud computing news.
Quelle: Thoughts on Cloud

OpenShift Scale-CI: Part 2 – Deep Dive

OpenShift Scale-CI: Part 2 – Deep Dive

In part one of the series, we saw how the Red Hat OpenShift Scale-CI evolved. In this post, we will look at the various components of Scale-CI. OpenShift Scale-CI is not a single tool, it’s a framework which orchestrates a bunch of tools to help analyze and improve the Scalability and Performance of OpenShift. It does this by:

Loading thousands of objects on a large scale production cluster to stress the control plane ( ApiServer, Controller, Etcd ), kubelet and other system components.
Running various benchmarks, gathering performance data during the run and visualizing the data to identify bottlenecks and tuning opportunities.
Repeating the scale tests on OpenShift deployed on various clouds including AWS, Azure, OpenStack and GCP to monitor Performance and Scalability regressions.

The motivation behind building Scale-CI is also to onboard and enable other teams to take advantage of the automation, tooling and hardware to see how well their application/component performs at scale instead of building and maintaining their own clusters, infrastructure and tools.
Architecture

Scale-CI comprises of the following components:

Scale-CI pipeline: Acts as the orchestrator for all tools to deploy, configure, monitor and diagnose OpenShift. This is the entrypoint for onboarding workloads which will be run automatically at scale.
Workloads: Tools an OpenShift cluster and runs OpenShift Performance and Scale workloads.
Scale-CI deploy: Collection of playbooks and scripts to provision and install OpenShift on various cloud platforms including AWS, Azure, GCP and OpenStack. It also supports scaling and upgrading the cluster to the desired payload.
Images: Hosts the container images source files for Scale-CI. The builds are triggered by commits into this repo. In addition we will periodically trigger rebuilds when tools in dependent containers are built and published.
Scale-CI graphshift: Deploys mutable Grafana with Performance Analysis Dashboards for OpenShift.

Scale-CI diagnosis: Running OpenShift at high scale is expensive. There is a chance that a particular config, component logs or metrics need to be looked at after the cluster has been terminated to find an issue during a particular scale test run on the cluster. This motivated us to create this tool. It helps in debugging the issues by capturing  Prometheus database from the running Prometheus pods to the local file system. This can be used to look at the metrics later by running Prometheus locally with the backed up DB. It also captures OpenShift cluster information including all the operator managed components using must-gather.
The Performance and Scalability team at Red Hat have built a number of other tools to help with our work:

Cluster Loader: Deploys large numbers of various objects to a cluster, which creates user-defined cluster objects. Build, configure, and run Cluster Loader to measure the performance metrics of your OpenShift Container Platform deployment in various cluster states. It is part of both OKD and upstream kubernetes.
Pbench:  This is a  benchmarking and performance analysis framework which runs benchmarks across one or more systems, while properly collecting the configuration of those systems, their logs and specified telemetry from various tools (sar, vmstat, perf, etc.). The collected data is shipped off to the Pbench server which is responsible for archiving the resulting tar balls, indexing them and unpacking them for display.

A typical Scale-CI run installs OpenShift on a chosen cloud provider, sets up tooling to run a pbench-agent DaemonSet, runs Conformance (e2e test suite ) to check the sanity of the cluster, scales up the cluster to the desired node count, runs various scale tests focusing on Control plane density, kubelet density, HTTP/Router, SDN, Storage, Logging, Monitoring and Cluster Limits. It also runs a Baseline workload which collects configuration and performance data on an idle cluster to know how the product is moving across various OpenShift releases. The results are shipped to the Pbench server after processing for analysis and long term storage. The results are scraped to generate a machine readable output ( JSON ) of the metrics to compare with previous runs to pass/fail the Job and send a green/red signal. 
For large and long running clusters, components like Prometheus need more disk and resources including CPU and memory. Instead of using bigger worker nodes, we create infrastructure nodes with huge amounts of disk, CPU and memory using custom MachineSets and modify the node selector to ensure that the components including Prometheus, Logging, Router and Registry run on the infrastructure nodes. This is part of the day two operation and is needed for large scale clusters.
Adding a new workload to the framework or making changes to the existing Jobs is as simple as creating a PR using the sample templates provided in the repositories.. The Scale-CI watcher picks up the change after the PR gets merged and updates the respective Jobs.
 

We spoke about the Automated OpenShift/Kubernetes Scalability testing at KubeCon + CloudNativeCon North America 2018. The slides are here, you can also watch the presentation online at https://youtu.be/37naDDcmDo4.
We recently scale tested OpenShift 4.1 before the general availability, Keep an eye out for our next blog OpenShift Scale-CI: part 3, which will have the highlights of the OpenShift  4.1 scalability run. Like always, any feedback or contributions are most welcome.
The post OpenShift Scale-CI: Part 2 – Deep Dive appeared first on Red Hat OpenShift Blog.
Quelle: OpenShift

USAA and Google Cloud work together to speed auto claims

When U.S. military personnel and their families want to obtain insurance or financial solutions, one of the first places they turn to is USAA. For nearly 100 years, this San Antonio, Texas-based financial services organization has helped families facilitate their financial security, with a focus on building deep relationships with its members. Another focus for USAA has been using technology to deliver easy and convenient digital experiences. In fact, USAA was the first financial services company to introduce mobile deposits, allowing its members to deposit their checks wherever they are. And, the company was a pioneer in the use of drones and aerial imagery to assess property damage in hard-to-access areas after major natural disasters, such as hurricanes. Now, in collaboration with Google Cloud, USAA is using machine learning (ML) to speed up the auto claims process, obtaining near-real-time damage estimates from digital images. We’re proud to work with USAA on their digital solutions, helping create faster and more cost-efficient estimates within the claims process.Traditionally, assessing auto damage claims has been a time-intensive, laborious process. A claims adjuster needs to physically inspect each vehicle, determine the parts that need replacement, and understand the labor required for repair. They then submit a report to the insurer, who must approve the estimate before sharing it with the repair shop and car owner. This process can sometimes take weeks from beginning to end.Digitizing and moving to the cloud greatly streamlines this process. The appraiser takes photos of the car and uploads them to Google Cloud where, by applying machine learning, they can identify the damage in real-time and send that data to USAA and then into the Mitchell Estimating platform. Mitchell’s software searches parts and labor databases, applies the information to their estimate, and returns that estimate directly to USAA. Appraisers will review the estimate and make adjustments as needed. The new, cloud-based process will allow for faster and more cost-efficient estimates.”This technology now gives claims teams the opportunity to focus more deeply on connecting and providing guidance to our members, during what can often be a trying time,” said Ramon Lopez, USAA VP Innovation. Early results are promising, as USAA has been able to predict high-level damage across a diverse vehicle set with great accuracy. We’ve also worked with USAA employees across the evolving digital environment, providing direct engineer-to-engineer collaboration with our own ML experts. USAA plans to add even more features to streamline the claims process for its customers, so that eventually, the majority of low-complexity assessments will be touchless—allowing appraisers to focus on more complex cases that best utilize their expertise.”Innovation at USAA is not about technology for the sake of technology,” said Lopez. “It’s about enabling our businesses to keep pace with member expectations and needs, all while maintaining the level of service our members deserve.”
Quelle: Google Cloud Platform