Set up an Aerospike server using a GitHub action with ease
Aerospike is a highly available and scalable NoSQL distributed database used in production to provide blazingly fast performance at a Petabyte scale.
As a software engineer developing with Aerospike, you probably needed integration tests, and you already have your own way to set up an Aerospike cluster for this.
In this short post I will show you how to add an Aerospike server to your development workflows using the GitHub Action in seconds.
As a GitHub user, you may already know what GitHub actions are. They were launched in late 2018 and set a new standard for CI/CD on GitHub.
Getting Started
The first thing you need is to have your repository hosted on GitHub. Better understand the GitHub Actions if you’re new to them.
My Aerospike GitHub action repository is here, and it is also published on the GitHub marketplace.
Now what’s left is to see some
Usage examples
You can set up either Aerospike Community Edition or Enterprise Edition. What makes the difference is the feature-key-file parameter. Specify it to have an Aerospike Server Enterprise Edition.
Aerospike Community Edition
To set up an Aerospike Community Edition server with the default configuration
name: Set up Aerospike Database uses: reugn/github-action-aerospike@v1
Aerospike Enterprise Edition
To set up an Aerospike Enterprise Edition server by specifying the port, the server configuration and the feature key files
name: Set up Aerospike Database uses: reugn/github-action-aerospike@v1 with: port: 3300 config-file: ‘.github/aerospike/aerospike.conf’ feature-key-file: ‘.github/aerospike/features.conf’
Make sure to commit the configuration and the feature key files in your repository and provide the path, they must be in the same directory.
Now you have your Aerospike server running on Docker and ready for integration tests.
A complete list of supported inputs is available here.
That was fast as I promised. Both the read and the setup. Hope you found this useful, and don’t forget to subscribe to our newsletter to get updated with Aerospike weekly news.