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

Larify the charm #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions hooks/config-changed

This file was deleted.

24 changes: 0 additions & 24 deletions hooks/install

This file was deleted.

2 changes: 0 additions & 2 deletions hooks/relation-name-relation-broken

This file was deleted.

9 changes: 0 additions & 9 deletions hooks/relation-name-relation-changed

This file was deleted.

5 changes: 0 additions & 5 deletions hooks/relation-name-relation-departed

This file was deleted.

5 changes: 0 additions & 5 deletions hooks/relation-name-relation-joined

This file was deleted.

4 changes: 0 additions & 4 deletions hooks/start

This file was deleted.

7 changes: 0 additions & 7 deletions hooks/stop

This file was deleted.

6 changes: 0 additions & 6 deletions hooks/upgrade-charm

This file was deleted.

17 changes: 17 additions & 0 deletions layer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
repo: [email protected]:juju-solutions/layer-apache-spark.git
includes: ['layer:basic']
options:
basic:
packages:
- zlib1g-dev
- uuid-dev
- libmnl-dev
- gcc
- make
- git
- autoconf
- autoconf-archive
- autogen
- automake
- pkg-config
- curl
15 changes: 15 additions & 0 deletions reactive/netdata.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import subprocess
from charms.reactive import when, when_not
from charms.reactive import set_state, remove_state, is_state
from charmhelpers.core import hookenv, host


@when_not("netdata.installed")
def install_netdata():
hookenv.status_set('maintenance', 'Installing netdata')
subprocess.check_call(["/usr/bin/git", "clone", "https://github.com/firehol/netdata.git", "--depth=1"])
with host.chdir("netdata"):
subprocess.check_call(["./netdata-installer.sh"])
hookenv.open_port(19999)
hookenv.status_set('active', 'Ready')
set_state("netdata.installed")
1 change: 0 additions & 1 deletion revision

This file was deleted.