Code Monkey home page Code Monkey logo

artemis-rpm's Introduction

A Fedora Package for ActiveMQ Artemis

Target user experience

# Install the package
$ sudo dnf install activemq-artemis

# Start the server
$ sudo systemctl start artemis

# Check its status
$ systemctl status artemis
● artemis.service - Apache ActiveMQ Artemis
   Loaded: loaded (/usr/lib/systemd/system/artemis.service; disabled; vendor preset: disabled)
   Active: active (running) since Mon 2017-04-17 16:48:32 PDT; 2s ago
 Main PID: 1491 (java)
    Tasks: 62 (limit: 4915)
   CGroup: /system.slice/artemis.service
           └─1491 java -XX:+PrintClassHistogram -XX:+UseG1GC -XX:+AggressiveOpts -XX:+UseFastA [...]

# Install artemis as an always-on service
$ sudo systemctl enable artemis

# Access the server logs
$ journalctl -u artemis -f
-- Logs begin at Sat 2016-12-24 17:16:41 PST. --
Apr 17 16:48:33 localhost.localdomain artemis[1491]: 16:48:33,318 INFO  [org.apache.activemq.art [...]
Apr 17 16:48:33 localhost.localdomain artemis[1491]: 16:48:33,576 INFO  [org.apache.activemq.art [...]
Apr 17 16:48:33 localhost.localdomain artemis[1491]: 16:48:33,578 INFO  [org.apache.activemq.art [...]
Apr 17 16:48:33 localhost.localdomain artemis[1491]: 16:48:33,579 INFO  [org.apache.activemq.art [...]
Apr 17 16:48:33 localhost.localdomain artemis[1491]: 16:48:33,585 INFO  [org.apache.activemq.art [...]
Apr 17 16:48:33 localhost.localdomain artemis[1491]: 16:48:33,587 INFO  [org.apache.activemq.art [...]
Apr 17 16:48:33 localhost.localdomain artemis[1491]: 16:48:33,591 INFO  [org.apache.activemq.art [...]
Apr 17 16:48:33 localhost.localdomain artemis[1491]: 16:48:33,591 INFO  [org.apache.activemq.art [...]
Apr 17 16:48:33 localhost.localdomain artemis[1491]: 16:48:33,778 INFO  [org.apache.activemq.art [...]
Apr 17 16:48:33 localhost.localdomain artemis[1491]: 16:48:33,778 INFO  [org.apache.activemq.art [...]

# Query the package details
$ rpm -qi activemq-artemis
Name        : activemq-artemis
Version     : 0
Release     : 0.1.20170414.09958aa5.fc25
Architecture: x86_64
Install Date: Fri 14 Apr 2017 08:30:02 AM PDT
Group       : System Environment/Daemons
Size        : 47729949
License     : ASL 2.0
Signature   : RSA/SHA1, Fri 14 Apr 2017 08:00:32 AM PDT, Key ID 2e6ad057dda7ac49
Source RPM  : activemq-artemis-0-0.1.20170414.09958aa5.fc25.src.rpm
Build Date  : Fri 14 Apr 2017 08:00:21 AM PDT
Build Host  : copr-builder-435276744.novalocal
Relocations : (not relocatable)
Vendor      : Fedora Project COPR (jross/ssorj)
URL         : https://activemq.apache.org/artemis/
Summary     : A multi-protocol message broker
Description :
Apache ActiveMQ Artemis is a multi-protocol, embeddable, high
performance, clustered, asynchronous message broker

# Uninstall the package
$ sudo dnf remove activemq-artemis

Installation

Test RPMs are available for Fedora 24 and 25 from Fedora Copr.

$ sudo dnf copr enable jross/ssorj
$ sudo dnf install activemq-artemis

See the copr package for more information.

To build your own RPM locally:

$ cd activemq-artemis-rpm/
$ make clean test
[...]
Output: /home/jross/code/activemq-artemis-rpm/build/RPMS/x86_64/activemq-artemis-0-0.1.20170417.09958aa5.fc25.x86_64.rpm
$ sudo dnf install /home/jross/code/activemq-artemis-rpm/build/RPMS/x86_64/activemq-artemis-0-0.1.20170417.09958aa5.fc25.x86_64.rpm

Philosophy

This packaging of Artemis takes the view that its implementation language is not important. Instead, it's the network service, configuration files, and command-line tools that matter because they are the primary points of user interaction in a typical server deployment.

Files are moved into standard Linux locations. A default system instance is registered with systemd and ready for immediate use. The system instance executable is installed on the path.

File locations

  • /usr/lib64/artemis - Read-only Artemis code and resources
  • /usr/bin/artemis - The system instance executable
  • /etc/artemis - System instance configuration files
  • /var/lib/artemis - System instance data files
  • /var/log/artemis - System instance log files
  • /var/tmp/artemis - System instance temporary files
  • /usr/lib/systemd/system/artemis.service - The systemd service file

More topics to address

  • Make targets
  • Avoiding static web docs in the package
  • A new server script
    • No sed surgery
    • Synchronous stop
    • Better signal handling
    • Dynamic configuration
  • Initial security configuration
  • An SELinux policy
  • Remove libraries not required for brokerness

Notes

Build fails on EL 7

[WARNING] Rule 0: org.apache.maven.plugins.enforcer.RequireMavenVersion failed with message:
Detected Maven Version: 3.0.5 is not in the allowed range 3.1.

Miscellaneous

sudo runuser -u artemis artemis run

artemis-rpm's People

Contributors

ssorj avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.