All Apps and Add-ons

Splunk Cloud - uploading an app

jasongb
Path Finder

I am a horrible person: I use Windows, and know next to nothing about Linux. Please take a moment to judge me.

Now, on to the question: I have a dashboard in a lower environment that I would like to make into an app in our (cloud-based - CLOUD-BASED, mind you) production environment. Rightly so, the files that make up this application need to be uploaded so they can be validated. I thoroughly understand this necessity, and don't begrudge Splunk wanting to keep things safe. I really do want to comply.

The only thing currently failing is file permissions, which I can't modify to compliance in Windows.

I have been forced to grow as a person on this journey: I downloaded Vagrant and Virtual Box and have now SSH'd into the resulting Linux box. I put the folder (containing other folders) that comprise my application's files into the common directory (in my case, C:\Program Files\cmder) for my computer and the virtual Linux box.

I learned Linux commands! 'chmod' to alter the file permissions (see below, and note that this verbose response does list all files/folders, I just didn't want to bore anyone - everything is switched to 644):

mode of ‘customer_service/bin’ changed from 0777 (rwxrwxrwx) to 0644 (rw-r--r--)

... and 'tar' to zip it up! I still resent the command line, and laugh at how much of an argument Linux users can get into when someone asks how to recursively modify permissions on a directory - but hey, based on what I see in the Linux 'user interface', all of the files permissions are set and the file is zipped.

I jump over to Windows, visit the upload page, and navigate to the .tar.gz file and then upload it. Then I wait with breathless anticipation, because SURELY THIS TIME IT WILL WORK:

This file has execute permissions for owners, groups, or others. File: default/app.conf File: default/app.conf

I receive this message for each file in the directory. Can anyone explain this away? Is it evil Bill Gates jumping in to mess with file permissions when I browse to the .tar.gz file? Am I just another victim of the Windows conspiracy? How will we defeat the evil empire? Is there a Linux command that will let the file remain chaste and pure so I can upload it without exposing it to this horrible, evil experience? Do we have any hope at all for our future?

Tags (1)

eavent_splunk
Splunk Employee
Splunk Employee

I imagine this is way too late to help you, but may be for other stumbling onto this post - splunk has an inbuilt package command:

splunk package app your_app_name

The app must be in the $SPLUNK_HOME/etc/apps folder of the splunk instance you run the command on, and will output to $SPLUNK_HOME/etc/system/static/app-packages

Using this command should strip out any unwanted/unneeded OS level permissions and allow you to upload the app to Splunk Cloud.

Some further details (not specific to the Splunk Cloud "Upload Apps" function): http://dev.splunk.com/view/SP-CAAAEMY#package

0 Karma

PratikPashte
Explorer

@eavent_splunk I might be too late to reply to this post.

But where should we run the command ? under bin folder or under splunk home

Cause I am getting error, 

Could not look up Home Variable Auth Token cannot be cached.

I am doing it from Deployment server, executing command under config explorer

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...