Create Hex Repository

JFrog Artifactory Documentation

Products
JFrog Artifactory
Content Type
User Guide
ft:sourceType
Paligo

This section describes hex repositories in Artifactory and outlines how to create both local and remote Hex repositories in Artifactory. You can create Hex repositories to work locally using local repositories and proxy external Hex package sources using remote repositories.

Hex Repositories in Artifactory

In JFrog Artifactory, Hex repositories are used to store and manage hex packages written in the Elixir and Erlang programming languages. Artifactory supports two main types of Hex repositories, Local and Remote. These repositories serve different purposes in managing your Hex packages, whether they are internal to your organization or external dependencies.

Hex Local Repositories

A Hex Local Repository is a repository hosted within Artifactory that stores your Hex package and indexes it directly in Artifactory for storing first-party (internal) and second-party (partner) packages.

This type of repository is typically used for the following scenarios:

  • Storing Internal Packages: When you create your hex packages (.tar) that you want to reuse or share across different projects within your organization.

  • Managing Version Control

    • Storing different versions of your Hex packages and ensuring that they are accessible to other developers or CI/CD pipelines.

    • In a hex local repository, you can upload hex packages either manually or automatically through CI/CD tools, allowing your teams to consistently use the same package versions. Local repositories provide full control over the package storage, including access permissions, versioning, and caching.

Hex Remote Repositories

A Hex Remote Repository in Artifactory acts as a proxy to remote sources of Hex packages, such as the public Hex.pm repository. By configuring a remote repository, Artifactory allows you to cache and fetch external and third-party Hex packages from these remote sources.

  • Proxying Remote Hex Registries: Remote repositories in Artifactory act as proxies for remote Hex registries, such as the default https://repo.hex.pm, or other public or private repositories.

  • Package Caching and Access: When a package is requested, Artifactory first checks its local cache. If the package is not found, it retrieves it from the remote registry via the internet and caches it locally for future use. This ensures faster access to previously fetched packages, even without an internet connection. Only the requested packages are cached, not the entire repository.

  • Cache Management and Limitations

    • While resources in the cache can be removed, you cannot manually upload or push packages to a remote repository.

    • Remote repositories are ideal for integrating public dependencies into your development pipeline while maintaining control over which versions and packages are used.

    • Hex repositories in Artifactory allow streamlined package management, improve build reliability and performance, and ensure consistency across development environments. Whether managing internal packages or integrating external dependencies. You can maintain control, security, and efficiency throughout your Elixir development lifecycle.

The following are the related topics: