Open-source News

Coreboot 4.17 Brings New Motherboards, AMD PSB, Doom Game Ported To Run As A Payload

Phoronix - Thu, 06/02/2022 - 18:30
Coreboot developers are releasing Coreboot 4.17 today with various new motherboards supported, support for GRUB2 atop SeaBIOS as a payload, and various low-level code improvements too. Plus Coreboot 4.17 brings the "coreDOOM" payload -- yes, it's possible to get the game Doom running atop this system firmware. There is also AMD Platform Secure Boot (PSB) support introduced to Coreboot too...

Fragment Shading Rate Extension Comes To OpenGL ES

Phoronix - Thu, 06/02/2022 - 17:46
Since 2020 the Vulkan API has offered a fragment shading rate extension for allowing games to provide higher levels of detail in a scene compared to other less important areas of the screen. Desktop OpenGL has also offered a fragment shading rate extension while this week a similar extension has been added for OpenGL ES...

NTFS-3G Driver For FUSE-Based NTFS Support Updated For Security Fixes

Phoronix - Thu, 06/02/2022 - 17:32
Tuxera has issued its first new release of the NTFS-3G FUSE driver for NTFS read/write support on Linux and other platforms since last August's prior stable release. This new version was issued last week in order to ship security fixes...

PCI Changes Land In Linux 5.19 - Including Power Management Quirk For Intel DG2 Graphics

Phoronix - Thu, 06/02/2022 - 17:14
The PCI subsystem changes have landed for the in-development Linux 5.19 kernel...

Install Nagios Core on openSUSE 15.3 Linux

Tecmint - Thu, 06/02/2022 - 15:14
The post Install Nagios Core on openSUSE 15.3 Linux first appeared on Tecmint: Linux Howtos, Tutorials & Guides .

Nagios is an open-source, industry-leading, and enterprise-grade monitoring tool that you can use to keep an eye on most if not all aspects of your IT infrastructure including networks, hosts (and their resources), services,

The post Install Nagios Core on openSUSE 15.3 Linux first appeared on Tecmint: Linux Howtos, Tutorials & Guides.

Get started with Cadence, an open source workflow engine

opensource.com - Thu, 06/02/2022 - 15:00
Get started with Cadence, an open source workflow engine Ben Slater Thu, 06/02/2022 - 03:00 Register or Login to like Register or Login to like

Modern applications require complicated interactions between long-running business processes, internal services, and third-party APIs. To say it's been a challenge for developers is putting it mildly. Managing these processes means tracking complex states, preparing responses to asynchronous events, and communicating with often unreliable external dependencies.

Developers typically take on these complex challenges with solutions that are just as convoluted, assembling unwieldy systems that leverage stateless services, databases, retry algorithms, and job scheduling queues. Because these complex systems obscure their own business logic, availability issues are common, often stemming from the application's dependence on scattered and unproven components. Developer productivity is regularly sacrificed to keep these sprawling, troubled systems from collapsing.

Designing a distributed application

Cadence solves these issues by offering a highly scalable fault-oblivious code platform. Cadence abstracts away the usual challenges of implementing fault tolerance and durability with its fault oblivious code.

A standard Cadence application includes a Cadence service, workflow, activity workers, and external clients. If needed, it's acceptable to co-locate the roles of workflow workers, activity workers, and external clients in a single application process.

Cadence Service

Image by:

(Ben Slater, CC BY-SA 4.0)

Cadence is centered on its multi-tenant service and the high scalability it enables. A strongly typed gRPC API exposes all Cadence service functionality. A Cadence cluster can run multiple services on multiple nodes, including:

  • Front end: A stateless service that handles incoming worker requests, with instances backed by an external load balancer.
  • History service: Handles core logic for workflow steps and activity orchestration.
  • Matching service: Matches workflow or activity tasks with workers ready to complete them.
  • Internal worker service: Meets internal requirements (such as archiving) by introducing Cadence workflows and activities.
  • Workers: Function as Cadence client apps that execute user-created workflow and activity logic.

By default, Cadence supports Apache Cassandra, MySQL, PostgreSQL, CockroachDB, and TiDB for use as persistence stores, as well as ElasticSearch and OpenSearch for listing workflows with complex predicates.

Programming and development Red Hat Developers Blog Programming cheat sheets Try for free: Red Hat Learning Subscription eBook: An introduction to programming with Bash Bash shell scripting cheat sheet eBook: Modernizing Enterprise Java

Because the Cadence service is multi-tenant, a single service can serve one or many applications. A local Cadence service instance can be configured with docker-compose for local development. The Cadence service maintains workflow states, associated durable timers, and internal "task list" queues to send tasks to external workers.

Beyond the Cadence service itself:

  • Workflow workers: hosts fault-oblivious code externally to the Cadence service. The Cadence service sends these workers "decision tasks." The workers deliver the tasks to the workflow code and communicate the completed "decisions" back to the Cadence service. Workflow code can be implemented in any language able to communicate with Cadence API: production-ready Java and Go clients are currently available.

  • Activity workers: hosts "activities", or code that perform application specific actions such as service calls, database record updates, and file downloads. Activities feature task routing to specific processes, heartbeats, infinite retries, and unlimited execution time. The Cadence service sends activity tasks to these workers, who complete them and report completion.

  • External clients: enable the creation of workflow instances, or "executions". External clients such as UIs, microservices or CLIs use the StartWorkflowExecution Cadence service API call to implement executions. External clients are also capable of notifying workflows about asynchronous external events, synchronous workflow state queries, waiting for synchronous workflow completion, workflow restarts, cancellation, and searching for specific workflows with List API.

Getting started with Cadence

In this example we'll use the Cadence Java client. The client is available from GitHub, and JavaDoc documentation can be found here. You can also check for the latest release version.

To begin, add cadence-client as a dependency to your pom.xml file like this:

<dependency>

<groupId>com.uber.cadencegroupId>

<artifactId>cadence-clientartifactId>

<version>LATEST.RELEASE.VERSIONversion>

dependency>

Alternatively, you can use build.gradle:

compile group: ‘com.uber.cadence', name: ‘cadence-client', version: ‘LATEST.RELEASE.VERSION'

Java Hello World with Cadence

The best way to get an idea of what Cadence is capable of is to try it, so here's a simple "Hello World" example you can try. First, add the Cadence Java client dependency to your Java project. Using Gradle, the dependency looks like this:

compile group: ‘com.uber.cadence', name: ‘cadence-client', version: ‘'

Add these dependencies that the cadence-client requires as well:

compile group: ‘commons-configuration', name: ‘commons-configuration', version: ‘1.9'

compile group: ‘ch.qos.logback', name: ‘logback-classic', version: ‘1.2.3'

Then compile this code:

import com.uber.cadence.workflow.Workflow;
import com.uber.cadence.workflow.WorkflowMethod;
import org.slf4j.Logger;
public class GettingStarted {
private static Logger logger = Workflow.getLogger(GettingStarted.class);
public interface HelloWorld {
@WorkflowMethod
void sayHello(String name);
}
}

These Cadence Java samples are available to help if you encounter issues with the build files.

Next, put this logback config file into your classpath:

<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
-- encoders are assigned the type
ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%npattern>
encoder>
appender>
<logger name="io.netty" level="INFO"/>
<root level="INFO">
<appender-ref ref="STDOUT" />
root>
configuration>

Now create the Hello World workflow. Add HelloWorldImpl with the sayHello method, which logs and returns "Hello …":

import com.uber.cadence.worker.Worker;
import com.uber.cadence.workflow.Workflow;
import com.uber.cadence.workflow.WorkflowMethod;
import org.slf4j.Logger;
public class GettingStarted {
private static Logger logger = Workflow.getLogger(GettingStarted.class);
public interface HelloWorld {
@WorkflowMethod
void sayHello(String name);
}
public static class HelloWorldImpl implements HelloWorld {
@Override
public void sayHello(String name) {
logger.info("Hello " + name + "!");
}
}
}

Register the workflow implementation to the Cadence framework with a worker connected to a Cadence service. Workers will connect to a Cadence service running locally by default.

public static void main(String[] args) {
WorkflowClient workflowClient =
WorkflowClient.newInstance(
new WorkflowServiceTChannel(ClientOptions.defaultInstance()),
WorkflowClientOptions.newBuilder().setDomain(DOMAIN).build());
// Get worker to poll the task list.
WorkerFactory factory = WorkerFactory.newInstance(workflowClient);
Worker worker = factory.newWorker(TASK_LIST);
worker.registerWorkflowImplementationTypes(HelloWorldImpl.class);
factory.start();
}

Now you're ready to run the worker program. Here's an example log:

13:35:02.575 [main] INFO c.u.c.s.WorkflowServiceTChannel - Initialized TChannel for service cadence-frontend, LibraryVersion: 2.2.0, FeatureVersion: 1.0.0

13:35:02.671 [main] INFO c.u.cadence.internal.worker.Poller - start(): Poller{options=PollerOptions{maximumPollRateIntervalMilliseconds=1000, maximumPollRatePerSecond=0.0, pollBackoffCoefficient=2.0, pollBackoffInitialInterval=PT0.2S, pollBackoffMaximumInterval=PT20S, pollThreadCount=1, pollThreadNamePrefix=‘Workflow Poller taskList="HelloWorldTaskList", domain="test-domain", type="workflow"'}, identity=45937@maxim-C02XD0AAJGH6}

13:35:02.673 [main] INFO c.u.cadence.internal.worker.Poller - start(): Poller{options=PollerOptions{maximumPollRateIntervalMilliseconds=1000, maximumPollRatePerSecond=0.0, pollBackoffCoefficient=2.0, pollBackoffInitialInterval=PT0.2S, pollBackoffMaximumInterval=PT20S, pollThreadCount=1, pollThreadNamePrefix=‘null'}, identity=81b8d0ac-ff89-47e8-b842-3dd26337feea}

"Hello"'isn't printing, because the worker only hosts the workflow code. To execute the workflow, start it with the Cadence CLI:

$ docker run --network=host --rm ubercadence/cli:master --do test-domain workflow start --tasklist HelloWorldTaskList --workflow_type HelloWorld::sayHello --execution_timeout 3600 --input \"World\"
Started Workflow Id: bcacfabd-9f9a-46ac-9b25-83bcea5d7fd7, run Id: e7c40431-8e23-485b-9649-e8f161219efe

Now the program gives this output:

13:35:02.575 [main] INFO c.u.c.s.WorkflowServiceTChannel - Initialized TChannel for service cadence-frontend, LibraryVersion: 2.2.0, FeatureVersion: 1.0.0

13:35:02.671 [main] INFO c.u.cadence.internal.worker.Poller - start(): Poller{options=PollerOptions{maximumPollRateIntervalMilliseconds=1000, maximumPollRatePerSecond=0.0, pollBackoffCoefficient=2.0, pollBackoffInitialInterval=PT0.2S, pollBackoffMaximumInterval=PT20S, pollThreadCount=1, pollThreadNamePrefix=‘Workflow Poller taskList="HelloWorldTaskList", domain=“test-domain”, type="workflow"'}, identity=45937@maxim-C02XD0AAJGH6}

13:35:02.673 [main] INFO c.u.cadence.internal.worker.Poller - start(): Poller{options=PollerOptions{maximumPollRateIntervalMilliseconds=1000, maximumPollRatePerSecond=0.0, pollBackoffCoefficient=2.0, pollBackoffInitialInterval=PT0.2S, pollBackoffMaximumInterval=PT20S, pollThreadCount=1, pollThreadNamePrefix=‘null'}, identity=81b8d0ac-ff89-47e8-b842-3dd26337feea}

13:40:28.308 [workflow-root] INFO c.u.c.samples.hello.GettingStarted - Hello World!

Success! Now run this workflow execution:

$ docker run --network=host --rm ubercadence/cli:master --do test-domain workflow start --tasklist HelloWorldTaskList --workflow_type HelloWorld::sayHello --execution_timeout 3600 --input \"Cadence\"

Started Workflow Id: d2083532-9c68-49ab-90e1-d960175377a7, run Id: 331bfa04-834b-45a7-861e-bcb9f6ddae3e

You should get this output:

13:35:02.575 [main] INFO c.u.c.s.WorkflowServiceTChannel - Initialized TChannel for service cadence-frontend, LibraryVersion: 2.2.0, FeatureVersion: 1.0.0

13:35:02.671 [main] INFO c.u.cadence.internal.worker.Poller - start(): Poller{options=PollerOptions{maximumPollRateIntervalMilliseconds=1000, maximumPollRatePerSecond=0.0, pollBackoffCoefficient=2.0, pollBackoffInitialInterval=PT0.2S, pollBackoffMaximumInterval=PT20S, pollThreadCount=1, pollThreadNamePrefix=‘Workflow Poller taskList="HelloWorldTaskList", domain="test-domain", type="workflow"'}, identity=45937@maxim-C02XD0AAJGH6}

13:35:02.673 [main] INFO c.u.cadence.internal.worker.Poller - start(): Poller{options=PollerOptions{maximumPollRateIntervalMilliseconds=1000, maximumPollRatePerSecond=0.0, pollBackoffCoefficient=2.0, pollBackoffInitialInterval=PT0.2S, pollBackoffMaximumInterval=PT20S, pollThreadCount=1, pollThreadNamePrefix=‘null'}, identity=81b8d0ac-ff89-47e8-b842-3dd26337feea}

13:40:28.308 [workflow-root] INFO c.u.c.samples.hello.GettingStarted - Hello World!

13:42:34.994 [workflow-root] INFO c.u.c.samples.hello.GettingStarted - Hello Cadence!

Lastly, use this CLI to list the workflow:

$ docker run --network=host --rm ubercadence/cli:master --do test-domain workflow list

WORKFLOW TYPE | WORKFLOW ID | RUN ID | START TIME | EXECUTION TIME | END TIME

HelloWorld::sayHello | d2083532-9c68-49ab-90e1-d960175377a7 | 331bfa04-834b-45a7-861e-bcb9f6ddae3e | 20:42:34 | 20:42:34 | 20:42:35

HelloWorld::sayHello | bcacfabd-9f9a-46ac-9b25-83bcea5d7fd7 | e7c40431-8e23-485b-9649-e8f161219efe | 20:40:28 | 20:40:28 | 20:40:29

Look over the workflow execution history as well:

$ docker run --network=host --rm ubercadence/cli:master --do test-domain workflow showid 1965109f-607f-4b14-a5f2-24399a7b8fa7
1 WorkflowExecutionStarted {WorkflowType:{Name:HelloWorld::sayHello},
TaskList:{Name:HelloWorldTaskList},
Input:["World"],
ExecutionStartToCloseTimeoutSeconds:3600,
TaskStartToCloseTimeoutSeconds:10,
ContinuedFailureDetails:[],
LastCompletionResult:[],
Identity:cadence-cli@linuxkit-025000000001,
Attempt:0,
FirstDecisionTaskBackoffSeconds:0}
2 DecisionTaskScheduled {TaskList:{Name:HelloWorldTaskList},
StartToCloseTimeoutSeconds:10,
Attempt:0}
3 DecisionTaskStarted {ScheduledEventId:2,
Identity:45937@maxim-C02XD0AAJGH6,
RequestId:481a14e5-67a4-436e-9a23-7f7fb7f87ef3}
4 DecisionTaskCompleted {ExecutionContext:[],
ScheduledEventId:2,
StartedEventId:3,
Identity:45937@maxim-C02XD0AAJGH6}
5 WorkflowExecutionCompleted {Result:[],
DecisionTaskCompletedEventId:4}

It may be a simple workflow, but looking at the history is quite informative. The history's value as a troubleshooting, analytics, and compliance tool only increases with the complexity of the workflow. As a best practice, automatically archive the history to a long-term blob store when workflows complete.

Try Cadence

Cadence offers transformative advantages for organizations and application development teams charged with creating and managing high-scale distributed applications built for high durability, availability, and scalability. Cadence is available to all as free and open source software, making it simple for teams to explore its capabilities and determine if Cadence is a strong fit for their organizations.

Using Cadence is as simple as cloning the Git repository for the Cadence server or the container image. For more details on getting started, visit: https://cadenceworkflow.io/docs/get-started/.

Cadence simplifies the complexity of distributed systems so that developers can focus on creating applications built for high durability, availability, and scalability.

Image by:

opensource.com

Programming DevOps Alternatives What to read next This work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License. Register or Login to post a comment.

The only Linux command you need to know

opensource.com - Thu, 06/02/2022 - 15:00
The only Linux command you need to know Seth Kenlon Thu, 06/02/2022 - 03:00 1 reader likes this 1 reader likes this

Information about Linux and open source abounds on the internet, but when you're entrenched in your work there's often a need for quick documentation. Since the early days of Unix, well before Linux even existed, there's been the man (short for "manual") and info commands, both of which display official project documentation about commands, configuration files, system calls, and more.

There's a debate over whether man and info pages are meant as helpful reminders for users who already know how to use a tool, or an intro for first time users. Either way, both man and info pages describe tools and how to use them, and rarely address specific tasks and how to accomplish them. It's for that very reason that the cheat command was developed.

For instance, suppose you can't remember how to unarchive a tar file. The man page provides you with all the options you require, but it leaves it up to you to translate this information into a functional command:

tar -A [OPTIONS] ARCHIVE ARCHIVE
tar -c [-f ARCHIVE] [OPTIONS] [FILE...]
tar -d [-f ARCHIVE] [OPTIONS] [FILE...]
tar -t [-f ARCHIVE] [OPTIONS] [MEMBER...]
tar -r [-f ARCHIVE] [OPTIONS] [FILE...]
tar -u [-f ARCHIVE] [OPTIONS] [FILE...]
tar -x [-f ARCHIVE] [OPTIONS] [MEMBER...]

That's exactly what some users need, but it confounds other users. The cheat sheet for tar, by contrast, provides complete common commands:

$ cheat tar

# To extract an uncompressed archive:
tar -xvf /path/to/foo.tar

# To extract a .tar in specified Directory:
tar -xvf /path/to/foo.tar -C /path/to/destination/

# To create an uncompressed archive:
tar -cvf /path/to/foo.tar /path/to/foo/

# To extract a .tgz or .tar.gz archive:
tar -xzvf /path/to/foo.tgz
tar -xzvf /path/to/foo.tar.gz
[...]

It's exactly what you need, when you need it.

More Linux resources Linux commands cheat sheet Advanced Linux commands cheat sheet Free online course: RHEL technical overview Linux networking cheat sheet SELinux cheat sheet Linux common commands cheat sheet What are Linux containers? Our latest Linux articles The Linux cheat command

The cheat command is a utility to search for and display a list of example tasks you might do with a Linux command. As with many Unix commands, there are different implementations of the same concept, including one written in Go and one, which I help maintain, written in just 100 lines of Bash.

To install the Go version, download the latest release and put it somewhere in your path, such as ~/.local/bin/ or /usr/local/bin. To install the Bash version, download the latest release and run the install-cheat.sh script:

$ sh ./install-cheat.sh

Or to configure the installation, use Autotools:

$ aclocal ; autoconf
$ automake --add-missing ; autoreconf
$ ./configure --prefix=$HOME/.local
$ make
$ make installGet cheat sheets for your Linux terminal

Cheat sheets are just plain text files containing common commands. The main collection of cheat sheets is available at Github.com/cheat/cheatsheets. The Go version of cheat downloads cheatsheets for you when you first run the command. If you're using the Bash version of cheat, the --fetch option downloads cheatsheets for you:

$ cheat --fetch

As with man pages, you can have multiple collections of cheat sheets on your system. The Go version of cheat uses a YAML config file to define where each collection is located. The Bash version defines the path during the install, and by default downloads the Github.com/cheat/cheatsheets collection as well as Opensource.com's own Gitlab.com/opensource.com/cheatsheets collection.

List cheat sheets

To list the cheat sheets on your system, use the --list option:

$ cheat --list
7z
ab
acl
alias
ansi
ansible
ansible-galaxy
ansible-vault
apk
[...]View a Linux cheat sheet

Viewing a cheat sheet is as easy as viewing a man or info page. Just provide the name of the command you need help with:

$ cheat alias

# To show a list of your current shell aliases:
alias

# To alias `ls -l` to `ll`:
alias ll='ls -l'

By default, the cheat command uses your environment's pager. Your pager is set with the PAGER environment variable. You can override that temporarily by redefining the PAGER variable before running the cheat command:

$ PAGER=most cheat less

If you just want to cat the cheat sheet into your terminal without a pager, the Bash version has a --cat option for convenience:

$ cheat --cat lessIt's not actually cheating

The cheat system cuts to the chase. You don't have to piece together clues about how to use a command. You just follow the examples. Of course, for complex commands, it's not a shortcut for a thorough study of the actual documentation, but for quick reference, it's as fast as it gets.

You can even create your own cheat sheet just by placing a file in one of the cheat sheet collections. Good news! Because the projects are open source, you can contribute your personal cheat sheets to the GitHub collection. And more good news! When there's a new Opensource.com cheat sheet release, we'll include a plain text version from now on so you can add that to your collection.

The command is called cheat, but as any Linux user will assure you, it's not actually cheating. It's working smarter, the open source way.

The Linux cheat command is a utility to search for and display a list of example tasks you might do with a command.

Image by:

Opensource.com

Linux What to read next This work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License. Register or Login to post a comment.

Arch Linux Hits Top Linux Spot Over Ubuntu In May's Steam Survey

Phoronix - Thu, 06/02/2022 - 08:40
The Steam Survey results are in for May 2022 and while it shows Linux slightly down on a percentage basis, it shows a new top-spot for the most popular Linux distribution unseating Ubuntu LTS...

Mesa 22.1.1 Released With Many Open-Source Graphics Driver Fixes

Phoronix - Thu, 06/02/2022 - 07:58
Last month marked the debut of Mesa 22.1 as the newest quarterly release to this open-source Linux graphics driver stack. For those that prefer waiting until the first point release before upgrading, today is the day with Mesa 22.1.1 now available...

Pages