Deployment Architecture

How to remove .svn directory from deployed apps?

scsvnovonordisk
New Member

We're looking to place our deployment-apps folder on the Splunk deployment server under version control. We're planning on using Subversion for this. Each directory (app, default and local, and so on) each would get a .svn directory for tracking. When deploying the apps to clients, each of those .svn directories would get pushed to clients.

Is there any way to prevent the .svn directories from being part of the app bundles?

0 Karma

richgalloway
SplunkTrust
SplunkTrust

I've done that a couple of ways, neither of which is perfect.

1) Create a custom build script that tars only the desired directories and ignores the undesired. This delivers the right files, but does merge .conf files the way the Splunk package command does.

2) Use splunk package app foo to do the packaging then delete unwanted files/directories from the .spl file. This merges .conf files, but then the delivered tarball doesn't match the "built" one.

---
If this reply helps you, Karma would be appreciated.
0 Karma

scsvnovonordisk
New Member

Can you elaborate more on how to use a custom build script on a deployment server?

0 Karma

richgalloway
SplunkTrust
SplunkTrust

I wrote mine in bash. It was a simple script that checked a couple of prerequisites then passed a list of directories to tar.

---
If this reply helps you, Karma would be appreciated.
0 Karma

scsvnovonordisk
New Member

Sorry, I meant how did you incorporate it into the deployment server? Can we override how Splunk builds the packages that get deployed to servers?

0 Karma

richgalloway
SplunkTrust
SplunkTrust

My script runs on our "build" server. The tarball produced by the script is what gets deployed.

---
If this reply helps you, Karma would be appreciated.
0 Karma

rjthibod
Champion

hmmm, is Subversion a hard requirement or could you use Mercurial? The problem goes away and you get to use pretty much the same types of version control commands.

0 Karma

scsvnovonordisk
New Member

Sadly, a hard requirement... Any tool that doesn't drop a folder at each directory level would work better but its the standard for the team right now.

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...

Step into “Hunt the Insider: An Splunk ES Premier Mystery” to catch a cybercriminal ...

After a whole week of being on call, you fell asleep on your keyboard, and you hit a sequence of buttons that ...