Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[build] update install package paths, centralize config #7308

Merged
merged 15 commits into from Jun 8, 2016

Conversation

jbudz
Copy link
Member

@jbudz jbudz commented May 27, 2016

Depends on #6674, and #7276
Closes #7373
Part 1 and 2 of #7275

  • centralize package config
  • install kibana to /usr/share/kibana
  • install config to /etc/kibana/kibana.yml

@w33ble
Copy link
Contributor

w33ble commented Jun 8, 2016

I created a build on Xubuntu 16.04, but I'm still having write permissions issues once it's installed:

$ service kibana status
● kibana.service - Explore and visualize your Elasticsearch data
   Loaded: loaded (/lib/systemd/system/kibana.service; disabled; vendor preset: enabled)
   Active: inactive (dead)
/usr/share/kibana$ ./bin/kibana
fs.js:549
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^

Error: EACCES: permission denied, open '/usr/share/kibana/optimize/.babelcache.json'
    at Error (native)
    at Object.fs.openSync (fs.js:549:18)
    at Object.fs.writeFileSync (fs.js:1156:15)
    at save (/usr/share/kibana/node_modules/babel-core/lib/api/register/cache.js:35:19)
    at nextTickCallbackWith0Args (node.js:420:9)
    at process._tickCallback (node.js:349:13)
    at Function.Module.runMain (module.js:443:11)
    at startup (node.js:139:18)
    at node.js:968:3
/usr/share/kibana$ ls -la optimize/
total 12
drwxrwxr-x 3 kibana kibana 4096 Jun  7 17:13 .
drwxrwxr-x 9 root   root   4096 Jun  7 17:13 ..
drwxrwxr-x 4 kibana kibana 4096 Jun  7 17:13 bundles
$ uname -a
Linux xubuntu-virtual-machine 4.4.0-21-generic #37-Ubuntu SMP Mon Apr 18 18:33:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

@w33ble w33ble self-assigned this Jun 8, 2016
@w33ble
Copy link
Contributor

w33ble commented Jun 8, 2016

It seems the permissions are correct, they just aren't correct on first run. For example, this works:

$ service kibana restart
$ service kibana status
● kibana.service - Explore and visualize your Elasticsearch data
   Loaded: loaded (/lib/systemd/system/kibana.service; disabled; vendor preset: enabled)
   Active: active (running) since Wed 2016-06-08 10:06:25 MST; 8s ago
 Main PID: 17227 (node)
    Tasks: 9 (limit: 512)
   CGroup: /system.slice/kibana.service
           └─17227 /usr/share/kibana/bin/../node/bin/node /usr/share/kibana/bin/../src/cli -c /etc/kibana/kibana.yml
Jun 08 10:06:32 d33t-virtual-machine kibana[17227]: {"type":"log","@timestamp":"2016-06-08T17:06:32+00:00","tags":["stat

And now the bable cache is correctly written

/usr/share/kibana/optimize$ ls -la
total 16
drwxrwxr-x 3 kibana kibana 4096 Jun  8 10:06 .
drwxrwxr-x 9 root   root   4096 Jun  7 17:13 ..
-rw-r--r-- 1 kibana kibana    2 Jun  8 10:06 .babelcache.json
drwxrwxr-x 4 kibana kibana 4096 Jun  7 17:13 bundles

@w33ble
Copy link
Contributor

w33ble commented Jun 8, 2016

Ignore all the stuff I posted early. The install did fail for me, but I'm pretty sure it's not actually related to this PR, and it worked the second time I used dpkg to install it. I know there are some more changes coming, and this LGTM.

jbudz added a commit that referenced this pull request Jun 15, 2016
---------

**Commit 1:**
[build] Commit install/remove scripts instead of generating, stop service before removing

* Original sha: 08c9897
* Authored by Jonathan Budzenski <jbudz@users.noreply.github.com> on 2016-03-28T02:06:16Z

**Commit 2:**
[build] template user in install/remove scripts

* Original sha: 5387167
* Authored by Jonathan Budzenski <jbudz@users.noreply.github.com> on 2016-05-02T15:57:16Z

**Commit 3:**
[build] Run as group kibana

* Original sha: d9a84b2
* Authored by Jonathan Budzenski <jbudz@users.noreply.github.com> on 2016-05-02T16:27:58Z

**Commit 4:**
[build] Recursive chown optimize folder

* Original sha: 07618c3
* Authored by Jonathan Budzenski <jbudz@users.noreply.github.com> on 2016-05-03T15:12:04Z

**Commit 5:**
[build] Try service kibana stop before init script

* Original sha: 83c5802
* Authored by Jonathan Budzenski <jbudz@users.noreply.github.com> on 2016-05-03T15:20:16Z

**Commit 6:**
[build] Attempt to stop service pre-install

* Original sha: 6c6e4d3
* Authored by Jonathan Budzenski <jbudz@users.noreply.github.com> on 2016-05-09T19:40:05Z

**Commit 7:**
[build] Fail on errors

* Original sha: f9033a1
* Authored by Jonathan Budzenski <jbudz@users.noreply.github.com> on 2016-05-10T15:47:07Z

**Commit 8:**
[build] Cleanup postrm

* Original sha: bab73b8
* Authored by Jonathan Budzenski <jbudz@users.noreply.github.com> on 2016-05-10T18:16:51Z

**Commit 9:**
[build] Add comment in postrm explaining empty cases

* Original sha: 4336f2b
* Authored by Jonathan Budzenski <jbudz@users.noreply.github.com> on 2016-05-13T15:03:22Z

**Commit 10:**
[build] move install to /usr/share, config to /etc/kibana

* Original sha: 6d293af
* Authored by Jonathan Budzenski <jbudz@users.noreply.github.com> on 2016-05-25T14:12:08Z

**Commit 11:**
[build] consolidate package config

* Original sha: 8f0be48
* Authored by Jonathan Budzenski <jbudz@users.noreply.github.com> on 2016-05-25T19:21:36Z

**Commit 12:**
[build] Cleanup packages task

* Original sha: db5ac1e
* Authored by Jonathan Budzenski <jbudz@users.noreply.github.com> on 2016-05-25T20:15:09Z

**Commit 13:**
[build] Style cleanup

* Original sha: 6189c19
* Authored by Jonathan Budzenski <jbudz@users.noreply.github.com> on 2016-05-25T20:19:16Z

**Commit 14:**
[build] template chown optimize dir

* Original sha: 9213e61
* Authored by Jonathan Budzenski <jbudz@users.noreply.github.com> on 2016-05-25T21:27:20Z

**Commit 15:**
[build] Add name and description to init scripts

* Original sha: e1cb593
* Authored by Jonathan Budzenski <jbudz@users.noreply.github.com> on 2016-06-07T19:48:57Z
@jbudz jbudz mentioned this pull request Jun 16, 2016
@epixa epixa added v5.0.0 and removed v5.0.0 labels Aug 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants