ProductPromotion
Logo

Elixir

made by https://0x3d.site

GitHub - smpallen99/exrm-rpm: Create a rpm for your elixir release with ease
Create a rpm for your elixir release with ease. Contribute to smpallen99/exrm-rpm development by creating an account on GitHub.
Visit Site

GitHub - smpallen99/exrm-rpm: Create a rpm for your elixir release with ease

GitHub - smpallen99/exrm-rpm: Create a rpm for your elixir release with ease

Elixir Release Manager RPM Generator

Adds simple Red Hat Package Manager (RPM) generation to the exrm package manager.

Usage

You can build an rpm at the same time as building a release by adding the --rpm option to release

  • mix release --rpm

This task first constructs the release using exrm, then generates an rpm file for the release. The rpm is build using default spec file and init script templates. If you would like to customize the templates, you can first run the release.copy_rpm_templates task.

  • mix release.rpm.copy.templates

To see what flags can be passed, use mix help release.rpm.copy.templates.

The _build/rpm directory tree, along with the rest of the release with mix release.clean

Please visit exrm for additional information.

Getting Started

This project's goal is to make building a rpm for an Elixir release very simple, by adding the rpm features to the exrm project. To get started:

Add exrm_rpm as a dependency to your project

  defp deps do
    [{:exrm_rpm, "~> 0.3.3", warn_missing: false}]
  end

Note: The warn_missing: false will suppress the exrm missing dependency message.

Fetch and Compile

  • mix deps.get
  • mix deps.compile

Perform a release and build a rpm

  • mix release --rpm

Copy the rpm to your target system and install

> scp rel/test/releases/0.0.1/test-0.0.1-0.x86_64.rpm [email protected]:/tmp/
> ssh [email protected]
> rpm -i /tmp/test-0.0.1-0.x86_64.rpm

Manage the service on your target system

> service test start
> service test stop
> service test status
> service test restart
> service test remote_console
> service test console

Customizing the rpm

Setting the rpm's summary and description meta data

Edit your projects config/config.exs file

[
  test: [
    summary: "An example rpm build project ...",
    description: """
    This is the description of my test project. 
    Use it wisely...
    """,
  ]
]

Customizing the spec file and init script templates

Copy the templates with:

mix release.rpm.copy.templates

Now edit the spec template in your favorite text editor

vim rpm/templates/spec

You can also edit the init script template

vim rpm/templates/init_script

The next time you run mix release --rpm, it will use the custom templates.

Lack of support for a mix task to remove custom templates is deliberate. Once created, these files are considered part of your projects source code and should be managed appropriately.

Add additional installation files

If your application requires additional installation files, create a new sources directory under the rpm directory.

mkdir rpm/sources

Add the additional files into this directory. They will be copied into the build 'SOURCES' directory prior to running rpm-build.

Finally, add the new sources in the spec template and the appropriate spec file logic to process the additional files.

Additional Notes

  • The generated rpm installs the following

    • the release in /usr/local/app_name
    • an init.d script to manage the service
  • During the rpm build process, the following directory tree and files are created:

    • _build/rpm/SPECS/name.spec - the generated spec file used to build the rpm
    • _build/rpm/SOURCES/name - the generated init script included in the rpm
    • rel/name/releases/version/name-version-arch.rpm - the generated rpm

Import Links

Acknowledgements

  • Thanks to @bitwalker for the exrm plugin capabilities and all his help.

Feedback

This project was built based on my experience building RPMs for E-MetroTels's products. I welcome input from others.

License

exrm_rpm is copyright (c) 2014-2016 E-MetroTel.

The source code is released under the MIT License.

Check LICENSE for more information.

Articles
to learn more about the elixir concepts.

Resources
which are currently available to browse on.

mail [email protected] to add your project or resources here 🔥.

FAQ's
to know more about the topic.

mail [email protected] to add your project or resources here 🔥.

Queries
or most google FAQ's about Elixir.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory