Created 02-27-2025 02:01 AM
Hi All,
We have installed Nifi and Nifi Registry 1.28 on an AWS ECS instance running on Fargate. The installation seems to be working fine, and both the applications can communicate with each other. We now wanted to set up Git Integration for Nifi Registry using ssh authentication. Can someone please help with detailed steps, article or content with this.
We did try multiple options, but this is not successful.
Since our Nifi instance is on ECS Fargate, we tried cloning the repo using Docker Image and SSH key which was successful. However, when we pass the details in the providers.xml file, the instance doesn't come up.
Can someone please help with the exact steps and what properties and values to be passed in providers.xml file when using ssh authentication.
@steven-matison @MattWho : Your guidance and help will be much appreciated!!!
Created 02-27-2025 10:41 PM
@rj27, Welcome to our community! To help you get the best possible answer, I have tagged in our NiFi experts @SAMSAL @Shelton who may be able to assist you further.
Please feel free to provide any additional information or details about your query, and we hope that you will find a satisfactory solution to your question.
Regards,
Vidya Sargur,Created 03-01-2025 11:46 AM
@rj27
To set up Git integration for Apache NiFi Registry using SSH authentication, you need to configure the NiFi Registry to use a Git-based flow persistence provider.
Analysis of Current Setup
Below are the detailed steps to achieve this on an AWS ECS instance running on Fargate with NiFi and NiFi Registry 1.28.
Detailed Steps for Git Integration
Step 1: Update NiFi Registry Configuration
Add the following properties to configure the Git flow persistence provider
1. Generate an SSH key pair inside your container
2. Add your public key to your Git repository's authorized keys (in GitHub, GitLab, etc.)
3. Configure SSH client in the container
4. Set proper permissions
1. Update your ECS task definition to include a volume for SSH keys and Git repository validate the JSON's
2. Mount this volume in your container definition
2. Test the connection
Step 7: Restart NiFi Registry
# If using systemd
systemctl restart nifi-registry
# If using the command line
./bin/nifi-registry.sh restart
# In AWS ECS, update the service to force new deployment
aws ecs update-service --cluster your-cluster --service your-nifi-registry-service --force-new-deployment
1. Check NiFi Registry logs for Git-related errors:
2. Verify SSH connectivity
3. Common issues:
Security: Ensure the private key is stored securely and not exposed in the container image or logs.
Automation: Consider using AWS Secrets Manager or Parameter Store to manage the SSH key and passphrase securely.
Backup: Regularly back up your Git repository to avoid data loss.
Happy hadooping
Created 03-02-2025 01:51 AM
Thank You @Shelton for your revert. Will give this this a try and confirm back. Could you also please suggest the values to be passed in providers.xml file. Also, we are going to use EFS as our external volume and mount the same here. So do we add the same for keys instead of local. Lastly, I am using my personal user and email id for git configuration as of now. What is the best way suggested. I see that you have mentioned below user name and email for configuration. Is that a default user or we create a service user with same name. Please suggest
git config --global user.name "NiFi Registry"
git config --global user.email "nifi-registry@example.com"
Created 03-02-2025 02:31 AM
@rj27
Some clarification on the git setup
This is the author name that will appear in commit messages
This is the email address associated with commits
Values to be passed
Created 03-02-2025 01:59 AM
@Shelton - Also if you suggest the best way to set up CICD pipelines for 1.28 version considering we have GIT in place. How can I move my code and parameter context in higher environments. We have different set of nifi and nifi registry for each environmenet and we plan to maintain separate dev, qa and prod branches in same git repo. We want to set up GitHub Action workflows for the same. We have just adopted Nifi and are trying to figure out the best way to set up automated cicd pipelines for each environment considering all flows and parameter context are being taken care of.
Created 03-24-2025 03:58 AM
Thank you so much for helping me out.