Git Product home page Git Product logo

docker-cabot's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-cabot's Issues

Fail to run the initial database migrations

Hi,

Flowing docker steps.

I have this Error in Step 3 : Run the initial database migrations

$ docker run --rm --env-file production.env --link cabot-postgres:postgres cabotapp/cabot cabot migrate

 docker run --rm --env-file production.env --link cabot-postgres:postgres cabotapp/cabot cabot migrate
Traceback (most recent call last):
  File "/usr/local/bin/cabot", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/site-packages/cabot/entrypoint.py", line 10, in main
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 363, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 355, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 83, in handle
    executor = MigrationExecutor(connection, self.migration_progress_callback)
  File "/usr/local/lib/python2.7/site-packages/django/db/migrations/executor.py", line 20, in __init__
    self.loader = MigrationLoader(self.connection)
  File "/usr/local/lib/python2.7/site-packages/django/db/migrations/loader.py", line 52, in __init__
    self.build_graph()
  File "/usr/local/lib/python2.7/site-packages/django/db/migrations/loader.py", line 209, in build_graph
    self.applied_migrations = recorder.applied_migrations()
  File "/usr/local/lib/python2.7/site-packages/django/db/migrations/recorder.py", line 65, in applied_migrations
    self.ensure_schema()
  File "/usr/local/lib/python2.7/site-packages/django/db/migrations/recorder.py", line 52, in ensure_schema
    if self.Migration._meta.db_table in self.connection.introspection.table_names(self.connection.cursor()):
  File "/usr/local/lib/python2.7/site-packages/django/db/backends/base/base.py", line 254, in cursor
    return self._cursor()
  File "/usr/local/lib/python2.7/site-packages/django/db/backends/base/base.py", line 229, in _cursor
    self.ensure_connection()
  File "/usr/local/lib/python2.7/site-packages/django/db/backends/base/base.py", line 213, in ensure_connection
    self.connect()
  File "/usr/local/lib/python2.7/site-packages/django/db/utils.py", line 94, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/usr/local/lib/python2.7/site-packages/django/db/backends/base/base.py", line 213, in ensure_connection
    self.connect()
  File "/usr/local/lib/python2.7/site-packages/django/db/backends/base/base.py", line 189, in connect
    self.connection = self.get_new_connection(conn_params)
  File "/usr/local/lib/python2.7/site-packages/django/db/backends/postgresql/base.py", line 176, in get_new_connection
    connection = Database.connect(**conn_params)
  File "/usr/local/lib/python2.7/site-packages/psycopg2/__init__.py", line 130, in connect
    conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
django.db.utils.OperationalError: could not connect to server: Connection refused
        Is the server running on host "localhost" (127.0.0.1) and accepting
        TCP/IP connections on port 5432?
could not connect to server: Network unreachable
        Is the server running on host "localhost" (::1) and accepting
        TCP/IP connections on port 5432?

I checked open port in docker container and out and every think seem to be OK.
$ declare -a array=($(tail -n +2 /proc/net/tcp | cut -d":" -f"3"|cut -d" " -f"1")) &amp;&amp; for port in ${array[@]}; do echo $((0x$port)); done
5432

This is my docker version :

docker version
Client:
 Version:       17.12.0-ce
 API version:   1.35
 Go version:    go1.9.2
 Git commit:    c97c6d6
 Built: Wed Dec 27 20:10:14 2017
 OS/Arch:       linux/amd64

Server:
 Engine:
  Version:      17.12.0-ce
  API version:  1.35 (minimum version 1.12)
  Go version:   go1.9.2
  Git commit:   c97c6d6
  Built:        Wed Dec 27 20:12:46 2017
  OS/Arch:      linux/amd64
  Experimental: false

This is my docker ps :

CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                    NAMES
a96aa2414097        postgres            "docker-entrypoint.s…"   4 hours ago         Up 4 hours          0.0.0.0:5432->5432/tcp   cabot-postgres
bca9555c62b4        redis               "docker-entrypoint.s…"   6 hours ago         Up 6 hours          6379/tcp                 cabot-redis

Hope that I can find the answer of this statement.

Best Regards

Khalil

SSL

Can you provide the Caddyfile exemple with certificates from Let'sEncrypt back ? The link in the README is dead. "There is a Caddyfile included which will automatically set up HTTPS using Let's Encrypt." Thanks

Version mismatch is on Docker-Compose up

git clone [email protected]:cabotapp/docker-cabot.git
(https://cabotapp.com/qs/quickstart.html)

docker-compose -f docker-compose.yml -f docker-compose-caddy.yml up -d
ERROR: Version mismatch: file ./docker-compose.yml specifies version 2.0 but extension file ./docker-compose-caddy.yml uses version 2.1
ERROR: Version mismatch: file ./docker-compose.yml specifies version 2.1 but extension file .../docker-cabot/docker-compose-base.yml uses version 2.0

Docker image should bring up webserver

Can you please change things so that the webapp is ready to go from the get go on port 5000?

I was trying to deploy cabot with the following on Kubernetes:

---
apiVersion: v1
kind: Service
metadata:
  name: cabot
  namespace: cabot
  labels:
    app: cabot
spec:
  ports:
    - port: 5000
  selector:
    app: cabot
    tier: frontend
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: cabot
  namespace: cabot
  labels:
    name: cabot
spec:
  template:
    metadata:
      labels:
        app: cabot
        tier: frontend
    spec:
      containers:
       - name: cabot
         image: cabotapp/cabot:0.10.8
         ports:
           - containerPort: 5000
             protocol: TCP
         livenessProbe:
           tcpSocket:
             port: 5000
         readinessProbe:
           tcpSocket:
             port: 5000
         volumeMounts:
          - name: cabot-configmap
            mountPath: /
            readOnly: true
      volumes:
        - name: cabot-configmap
          configMap:
            name: cabot-configmap
            items:
            - key: cabot-config
              path: production.env

Apart from the image, and labels such as names and TCP ports - this is pretty much how I deploy every application to my kubernetes cluster. I was confused as to why the image kept falling to boot - I wasn't expecting a webserver to do a "CMD ["/bin/sh"]"!

If no valid configuration is provided, it should be like wordpress where it brings up a web wizard asking where the database is, etc.

README.md and .env is out-of-date wrt docker images

The README contains a list of supported tags, but this is out-of-date: it lists 0.10.8 as latest, while 0.11.9 is already there. This is very confusing, both on the github repo as on the Docker Hub.

Similarly, the .env file that specifies the image to use, still specifies 0.11.2.

I suggest to either update the README every time a new image is pushed, or (perhaps easier) just leave out those descriptions and let users use the standard mechanisms, like the 'Tags' tab on Docker Hub or the 'Releases' tag in GitHub on the main cabot repo.

For the .env file I suggest to update it every time a new image is pushed.

Default timezone of the cabot app?

What is the default timezone of the cabot app and is there a way to change it from inside the admin UI to match the local time zone as all the alerts and other settings are off the local timezone?

Thanks.

InfluxDB support

I plan to use influxdb for metrics collection. Any suggestions on how to use this with cabot?

Graphite Integration Error - No Metrics Detected

Hi, im use the Docker over CentOs 7, the install are ok and have access without problem, but when im try add a Graphite Check not work, not detect any metric from my Graphite.
I think the problem is the Docker no have access to my Graphite server, but i dont know what is the way for validate this.

Can you help me with that? Is possible the docker dont have ping or access to the server over the same network?

Thx.
BR

How to migrate cabot to another machine ?

We have cabot running on one machine and we would like to move it to another production grade machine.
How can I migrate by retaining all the existing configuration and alert related data in the docker images?

We are using the docker-compose method to start the containers currently.

Have tried the below that did not retain data to move -

Source Machine -

docker save $(docker images --format '{{.Repository}}:{{.Tag}}') -o allinone.tar

Target Machine -

docker load -i allinone.tar
docker-compose up -d

some error about ldap

web_1       | ERROR 2017-05-10 14:47:36,427 exception 43 140440765537064 Internal Server Error: /accounts/login/
web_1       | Traceback (most recent call last):
web_1       |   File "/usr/local/lib/python2.7/site-packages/django/core/handlers/exception.py", line 42, in inner
web_1       |     response = get_response(request)
web_1       |   File "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 249, in _legacy_get_response
web_1       |     response = self._get_response(request)
web_1       |   File "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 187, in _get_response
web_1       |     response = self.process_exception_by_middleware(e, request)
web_1       |   File "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 185, in _get_response
web_1       |     response = wrapped_callback(request, *callback_args, **callback_kwargs)
web_1       |   File "/usr/local/lib/python2.7/site-packages/cabot/urls.py", line 42, in wrapper
web_1       |     return func(*args, **kwargs)
web_1       |   File "/usr/local/lib/python2.7/site-packages/django/contrib/auth/views.py", line 47, in inner
web_1       |     return func(*args, **kwargs)
web_1       |   File "/usr/local/lib/python2.7/site-packages/django/views/decorators/debug.py", line 76, in sensitive_post_parameters_wrapper
web_1       |     return view(request, *args, **kwargs)
web_1       |   File "/usr/local/lib/python2.7/site-packages/django/utils/decorators.py", line 149, in _wrapped_view
web_1       |     response = view_func(request, *args, **kwargs)
web_1       |   File "/usr/local/lib/python2.7/site-packages/django/views/decorators/cache.py", line 57, in _wrapped_view_func
web_1       |     response = view_func(request, *args, **kwargs)
web_1       |   File "/usr/local/lib/python2.7/site-packages/django/contrib/auth/views.py", line 81, in login
web_1       |     if form.is_valid():
web_1       |   File "/usr/local/lib/python2.7/site-packages/django/forms/forms.py", line 169, in is_valid
web_1       |     return self.is_bound and not self.errors
web_1       |   File "/usr/local/lib/python2.7/site-packages/django/forms/forms.py", line 161, in errors
web_1       |     self.full_clean()
web_1       |   File "/usr/local/lib/python2.7/site-packages/django/forms/forms.py", line 371, in full_clean
web_1       |     self._clean_form()
web_1       |   File "/usr/local/lib/python2.7/site-packages/django/forms/forms.py", line 398, in _clean_form
web_1       |     cleaned_data = self.clean()
web_1       |   File "/usr/local/lib/python2.7/site-packages/django/contrib/auth/forms.py", line 191, in clean
web_1       |     self.user_cache = authenticate(username=username, password=password)
web_1       |   File "/usr/local/lib/python2.7/site-packages/django/contrib/auth/__init__.py", line 74, in authenticate
web_1       |     user = backend.authenticate(**credentials)
web_1       |   File "/usr/local/lib/python2.7/site-packages/django_auth_ldap/backend.py", line 169, in authenticate
web_1       |     user = ldap_user.authenticate(password)
web_1       |   File "/usr/local/lib/python2.7/site-packages/django_auth_ldap/backend.py", line 342, in authenticate
web_1       |     self._authenticate_user_dn(password)
web_1       |   File "/usr/local/lib/python2.7/site-packages/django_auth_ldap/backend.py", line 452, in _authenticate_user_dn
web_1       |     if self.dn is None:
web_1       |   File "/usr/local/lib/python2.7/site-packages/django_auth_ldap/backend.py", line 416, in _get_user_dn
web_1       |     self._load_user_dn()
web_1       |   File "/usr/local/lib/python2.7/site-packages/django_auth_ldap/backend.py", line 479, in _load_user_dn
web_1       |     self._search_for_user_dn()
web_1       |   File "/usr/local/lib/python2.7/site-packages/django_auth_ldap/backend.py", line 499, in _search_for_user_dn
web_1       |     results = search.execute(self.connection, {'user': self._username})
web_1       |   File "/usr/local/lib/python2.7/site-packages/django_auth_ldap/backend.py", line 438, in _get_bound_connection
web_1       |     self._bind()
web_1       |   File "/usr/local/lib/python2.7/site-packages/django_auth_ldap/backend.py", line 723, in _bind
web_1       |     sticky=True)
web_1       |   File "/usr/local/lib/python2.7/site-packages/django_auth_ldap/backend.py", line 734, in _bind_as
web_1       |     self._get_connection().simple_bind_s(force_str(bind_dn),
web_1       |   File "/usr/local/lib/python2.7/site-packages/django_auth_ldap/backend.py", line 748, in _get_connection
web_1       |     self._connection = self.backend.ldap.initialize(uri)
web_1       |   File "/usr/local/lib/python2.7/site-packages/ldap/functions.py", line 96, in initialize
web_1       |     return LDAPObject(uri,trace_level,trace_file,trace_stack_limit,bytes_mode)
web_1       | TypeError: __init__() takes at most 5 arguments (6 given)

SSL/TLS email sending needs dependencies

I'm not sure whether this is a problem best solved at the docker-cabot level, or pushed upstream to cabot to put into requirements, but:

If the OS docker-cabot is installed and does NOT have the package python-openssl (ubuntu), py-openssl (alpine), etc. installed, attempting to send mail using the default production.env configuration file produces the error:

SSLError: [SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:661)
ERROR 2017-04-27 22:37:07,686 exception 26 139787706329896 Internal Server Error: /alert-test-plugin/

This is because, in a nutshell, the python library pyopenssl is not available to the dockercabot_web container. I can fix this by doing one of two things.

  1. I include py-openssl in the Dockerfile.build apk add section. This satisfies the dependency inside the container. Now I'll get the more friendly error amounting to 'I can do SSL but the other side isn't speaking it.'
error: [Errno 104] Connection reset by peer
ERROR 2017-04-27 22:41:25,852 exception 35 140337258289960 Internal Server Error: /alert-test-plugin/
  1. I do nothing inside the docker-cabot environment, but DO install pyopenssl in the encapsulating system's python libraries (or in the virtualenv in which I'm working, which is equivalent for these purposes).

If (1) is the answer, this is a docker-cabot bug and this dependency should be included in Dockerfile.build. If (2) is the preferred answer, this is a cabot bug in general and a dependency is missing for a fully functional application.

It occurs to me this may even be a dependency that should be included in BOTH places.

New install - docker web1 shows error

Hello,

I'm trying for the second time to setup your service.
Fresh install (debian 10),

I did :

=> git clone https://github.com/cabotapp/docker-cabot
=> rename conf/production.env
=> Run docker-compose up -d

And => docker-cabot_web_1
is not working. So I can't reach the local IP (nothing is listening on port 5000).

Here is the docker log

Traceback (most recent call last):
  File "/usr/local/bin/cabot", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/site-packages/cabot/entrypoint.py", line 10, in main
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 356, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 83, in handle
    executor = MigrationExecutor(connection, self.migration_progress_callback)
  File "/usr/local/lib/python2.7/site-packages/django/db/migrations/executor.py", line 20, in __init__
    self.loader = MigrationLoader(self.connection)
  File "/usr/local/lib/python2.7/site-packages/django/db/migrations/loader.py", line 52, in __init__
    self.build_graph()
  File "/usr/local/lib/python2.7/site-packages/django/db/migrations/loader.py", line 209, in build_graph
    self.applied_migrations = recorder.applied_migrations()
  File "/usr/local/lib/python2.7/site-packages/django/db/migrations/recorder.py", line 65, in applied_migrations
    self.ensure_schema()
  File "/usr/local/lib/python2.7/site-packages/django/db/migrations/recorder.py", line 52, in ensure_schema
    if self.Migration._meta.db_table in self.connection.introspection.table_names(self.connection.cursor()):
  File "/usr/local/lib/python2.7/site-packages/django/db/backends/base/base.py", line 254, in cursor
    return self._cursor()
  File "/usr/local/lib/python2.7/site-packages/django/db/backends/base/base.py", line 229, in _cursor
    self.ensure_connection()
  File "/usr/local/lib/python2.7/site-packages/django/db/backends/base/base.py", line 213, in ensure_connection
    self.connect()
  File "/usr/local/lib/python2.7/site-packages/django/db/utils.py", line 94, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/usr/local/lib/python2.7/site-packages/django/db/backends/base/base.py", line 213, in ensure_connection
    self.connect()
  File "/usr/local/lib/python2.7/site-packages/django/db/backends/base/base.py", line 189, in connect
    self.connection = self.get_new_connection(conn_params)
  File "/usr/local/lib/python2.7/site-packages/django/db/backends/postgresql/base.py", line 176, in get_new_connection
    connection = Database.connect(**conn_params)
  File "/usr/local/lib/python2.7/site-packages/psycopg2/__init__.py", line 130, in connect
    conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
django.db.utils.OperationalError: could not translate host name "postgres" to address: Name does not resolve

This docker container is restarting non stop, as well as "docker-cabot_postgres_1".

Here is the log from that container

Error: Database is uninitialized and superuser password is not specified.
       You must specify POSTGRES_PASSWORD to a non-empty value for the
       superuser. For example, "-e POSTGRES_PASSWORD=password" on "docker run".

       You may also use "POSTGRES_HOST_AUTH_METHOD=trust" to allow all
       connections without a password. This is *not* recommended.

       See PostgreSQL documentation about "trust":
       https://www.postgresql.org/docs/current/auth-trust.html

Any help would be appreciated.

lessc no found after start webserver

Hi,
flowing docker steps,
after start the cabot webserver, I open http://XXX:5000 in brower,
but error occurs as below, i find less have installed in Dockfile.
image

Environment:

Request Method: GET
Request URL: http://XXX:5000/setup/

Django Version: 1.11.11
Python Version: 2.7.14

Installed Applications:
('django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django_filters',
'compressor',
'polymorphic',
'jsonify',
'cabot.cabotapp',
'rest_framework',
'dal',
'dal_select2',
'django.contrib.admin',
'bootstrapform',
'cabot_alert_hipchat',
'cabot_alert_twilio',
'cabot_alert_email',
'cabot_alert_slack')
Installed Middleware:
('whitenoise.middleware.WhiteNoiseMiddleware',
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware')

Traceback:

File "/usr/local/lib/python2.7/site-packages/django/core/handlers/exception.py" in inner
41. response = get_response(request)

File "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py" in _legacy_get_response
249. response = self._get_response(request)

File "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py" in _get_response
187. response = self.process_exception_by_middleware(e, request)

File "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py" in _get_response
185. response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/usr/local/lib/python2.7/site-packages/django/views/generic/base.py" in view
68. return self.dispatch(request, *args, **kwargs)

File "/usr/local/lib/python2.7/site-packages/django/views/generic/base.py" in dispatch
88. return handler(request, *args, **kwargs)

File "/usr/local/lib/python2.7/site-packages/cabot/cabotapp/views.py" in get
996. return HttpResponse(self.template.render({'form': form}, request))

File "/usr/local/lib/python2.7/site-packages/django/template/backends/django.py" in render
66. return self.template.render(context)

File "/usr/local/lib/python2.7/site-packages/django/template/base.py" in render
207. return self._render(context)

File "/usr/local/lib/python2.7/site-packages/django/template/base.py" in _render
199. return self.nodelist.render(context)

File "/usr/local/lib/python2.7/site-packages/django/template/base.py" in render
990. bit = node.render_annotated(context)

File "/usr/local/lib/python2.7/site-packages/django/template/base.py" in render_annotated
957. return self.render(context)

File "/usr/local/lib/python2.7/site-packages/django/template/loader_tags.py" in render
177. return compiled_parent._render(context)

File "/usr/local/lib/python2.7/site-packages/django/template/base.py" in _render
199. return self.nodelist.render(context)

File "/usr/local/lib/python2.7/site-packages/django/template/base.py" in render
990. bit = node.render_annotated(context)

File "/usr/local/lib/python2.7/site-packages/django/template/base.py" in render_annotated
957. return self.render(context)

File "/usr/local/lib/python2.7/site-packages/compressor/templatetags/compress.py" in render
131. return self.render_compressed(context, self.kind, self.mode, forced=forced)

File "/usr/local/lib/python2.7/site-packages/compressor/templatetags/compress.py" in render_compressed
107. rendered_output = compressor.output(mode, forced=forced)

File "/usr/local/lib/python2.7/site-packages/compressor/css.py" in output
49. ret.append(subnode.output(*args, **kwargs))

File "/usr/local/lib/python2.7/site-packages/compressor/css.py" in output
51. return super(CssCompressor, self).output(*args, **kwargs)

File "/usr/local/lib/python2.7/site-packages/compressor/base.py" in output
295. output = '\n'.join(self.filter_input(forced))

File "/usr/local/lib/python2.7/site-packages/compressor/base.py" in filter_input
235. for hunk in self.hunks(forced):

File "/usr/local/lib/python2.7/site-packages/compressor/base.py" in hunks
205. precompiled, value = self.precompile(value, **options)

File "/usr/local/lib/python2.7/site-packages/compressor/base.py" in precompile
268. return True, filter.input(**kwargs)

File "/usr/local/lib/python2.7/site-packages/compressor/filters/base.py" in input
229. return super(CachedCompilerFilter, self).input(**kwargs)

File "/usr/local/lib/python2.7/site-packages/compressor/filters/base.py" in input
196. raise FilterError(err)

Exception Type: FilterError at /setup/
Exception Value: /bin/sh: lessc: not found

Unable to get a meaningful response from web server

When-ever I curl the web server on http://127.0.0.1:5000, I only get a 302 response. Trying to access from a web browser I get a 522 (through cloudfront). I have nuked everything, even down to changing droplets but I can't get past this issue.

I have tried it behind my own nginx proxy, the Caddy proxy you provide, I have even opened up port 80 directly to the app but I never receive the index page.

Any help would be greatly appreciated

Alert plugins

I am trying to enable email alerts. I have this in my production.env:

EMAIL_HOST=smtp.sendgrid.net
EMAIL_USER=<user>
EMAIL_PASSWORD=<password>
EMAIL_PORT=465

However I'm not receiving any email alerts. Do I have to enable anything else?

I would also like to enable the Slack alert plugin (https://github.com/cabotapp/cabot-alert-slack). How do I enter the cabot virtual environment?

Missing manage.py from Docker image

I'd like to create the first superuser at setup time in order to later create all the checks and services using Ansible.

To figure out how to do that I've opened arachnys/cabot#697 in which it turned out that:

  • Using django-admin createsuperuser with won't work because 1.11 does not support DJANGO_SUPERUSER_PASSWORD
  • The way that uses manage.py script to run some Python won't work either because this image lacks manage.py

As far as I'm concerned I just want a way to create a superuser with a password in a programmatic way so I can use the API without needing human intervention. The lack of manage.py makes this impossible.

I was thinking of inserting the user directly into the PostgreSQL database, but for that to work I think I'd need to know the salt for the pbkdf2_sha256 algorithm.

Procedure to add new plugins

I've followed the steps to add a new plugin:

  1. create own dockerfile
FROM cabotapp/cabot:0.11.13
RUN pip install cabot_alert_telegram
  1. build a new container
docker build -t foobar/cabot:latest .
  1. verified that pip install worked
docker run -it  foobar/cabot:latest /bin/sh
pip freeze

output

...
botocore==1.10.26
cabot==0.11.13
cabot-alert-email==1.4.3
cabot-alert-hipchat==2.0.3
cabot-alert-slack==0.8.3
cabot-alert-telegram==0.6
cabot-alert-twilio==1.3.3
cabot-check-cloudwatch==0.1.2
celery==4.0.2
...
  1. adjusted the docker-compose file to reference the new image
web:
    image: foobar/cabot:latest
  1. adjusted the conf/default.env file to add the new plugin
CABOT_PLUGINS_ENABLED=cabot_alert_email, cabot_alert_telegram
  1. get this error
web_1       | Traceback (most recent call last):
web_1       |   File "/usr/local/bin/cabot", line 11, in <module>
web_1       |     sys.exit(main())
web_1       |   File "/usr/local/lib/python2.7/site-packages/cabot/entrypoint.py", line 10, in main
web_1       |     execute_from_command_line(sys.argv)
web_1       |   File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
web_1       |     utility.execute()
web_1       |   File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 338, in execute
web_1       |     django.setup()
web_1       |   File "/usr/local/lib/python2.7/site-packages/django/__init__.py", line 27, in setup
web_1       |     apps.populate(settings.INSTALLED_APPS)
web_1       |   File "/usr/local/lib/python2.7/site-packages/django/apps/registry.py", line 85, in populate
web_1       |     app_config = AppConfig.create(entry)
web_1       |   File "/usr/local/lib/python2.7/site-packages/django/apps/config.py", line 94, in create
web_1       |     module = import_module(entry)
web_1       |   File "/usr/local/lib/python2.7/importlib/__init__.py", line 37, in import_module
web_1       |     __import__(name)
web_1       | ImportError: No module named  cabot_alert_telegram

what am i doing wrong?

Deployment on DigitalOcean

Hi, I'm trying to deploy this on a DO droplet. I'm pretty new to this and I ran into a problem.

I followed the instructions from here: https://cabotapp.com/qs/quickstart.html (cloned the repository, made the production.env file, and ran docker compose with caddy as a reverse proxy).

This is my Caddyfile:

subdomain.domain.com {
  proxy / http://127.0.0.1:5000 {
    header_upstream Host {host}
  }
}

But when I go to subdomain.domain.com I get "502 Bad Gateway".

Anyone has an idea what could be wrong?

Version in "./docker-compose.yml" is unsupported.

Hello,
I'm not familiar with Docker, but try to install Cabot with it as a quick start...

I set up new VPS on ubuntu 16.04 , Docker 1.12.6, docker-compose 1.8.0.
When starting with docker-compose up -d I get the following error:
Version in "./docker-compose.yml" is unsupported.

Any ideas?

Thanks

Run Migrations Step Not Working

I am getting the following error when attempting to deploy cabot via docker-compose via the steps in the README

user01@cabot01:/opt/docker-cabot# docker-compose run --rm web python /manage.py migrate
python: can't open file '/manage.py': [Errno 2] No such file or directory

Cabot migrate step not working

As per these instructions: https://github.com/cabotapp/docker-cabot

After running:

docker run -d --name cabot-redis redis
docker run -d --name cabot-postgres postgres
docker run --rm --env-file production.env --link cabot-postgres:postgres cabotapp/cabot cabot migrate

Results in

Traceback (most recent call last):
  File "/usr/local/bin/cabot", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/site-packages/cabot/entrypoint.py", line 10, in main
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 356, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 83, in handle
    executor = MigrationExecutor(connection, self.migration_progress_callback)
  File "/usr/local/lib/python2.7/site-packages/django/db/migrations/executor.py", line 20, in __init__
    self.loader = MigrationLoader(self.connection)
  File "/usr/local/lib/python2.7/site-packages/django/db/migrations/loader.py", line 52, in __init__
    self.build_graph()
  File "/usr/local/lib/python2.7/site-packages/django/db/migrations/loader.py", line 209, in build_graph
    self.applied_migrations = recorder.applied_migrations()
  File "/usr/local/lib/python2.7/site-packages/django/db/migrations/recorder.py", line 65, in applied_migrations
    self.ensure_schema()
  File "/usr/local/lib/python2.7/site-packages/django/db/migrations/recorder.py", line 52, in ensure_schema
    if self.Migration._meta.db_table in self.connection.introspection.table_names(self.connection.cursor()):
  File "/usr/local/lib/python2.7/site-packages/django/db/backends/base/base.py", line 254, in cursor
    return self._cursor()
  File "/usr/local/lib/python2.7/site-packages/django/db/backends/base/base.py", line 229, in _cursor
    self.ensure_connection()
  File "/usr/local/lib/python2.7/site-packages/django/db/backends/base/base.py", line 213, in ensure_connection
    self.connect()
  File "/usr/local/lib/python2.7/site-packages/django/db/utils.py", line 94, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/usr/local/lib/python2.7/site-packages/django/db/backends/base/base.py", line 213, in ensure_connection
    self.connect()
  File "/usr/local/lib/python2.7/site-packages/django/db/backends/base/base.py", line 189, in connect
    self.connection = self.get_new_connection(conn_params)
  File "/usr/local/lib/python2.7/site-packages/django/db/backends/postgresql/base.py", line 176, in get_new_connection
    connection = Database.connect(**conn_params)
  File "/usr/local/lib/python2.7/site-packages/psycopg2/__init__.py", line 130, in connect
    conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
django.db.utils.OperationalError: FATAL:  role "cabot" does not exist

Any clues?

Problems with Mapping Non-Standard Port

I setup my Cabot docker container on Ubuntu 18.04 and a public IP address and port mapping to port: 8080. It all works fine with the following setup:

docker-compose-caddy.yml:

version: "2.1"

services:
  caddy:
	image: abiosoft/caddy
	ports:
	  - '80:80'
	  - '443:443'
	depends_on:
	  - web
	volumes:
	  - ./.caddy:/root/.caddy
	  - ./conf/Caddyfile:/etc/Caddyfile

and docker-compose.yml:

version: "2.1"

services:
  web:
	extends:
	  file: docker-compose-base.yml
	  service: base
	command: sh -c "cabot migrate && gunicorn cabot.wsgi:application -b 0.0.0.0$
	ports:
	  - '8080:5000'
	depends_on:
	  - postgres
	  - rabbitmq
	restart: always
	...

However, when the server's Port 80 is used by another web application on my server and I want to map Cabot to port 8080 locally and then to 8080 publicly, it doesn't work.

In other words, the mapping would be:

Public Port 8080 --> Caddy Port 8080 --> Cabot 5000

I tried to change docker-compose-caddy.yml:

version: "2.1"

services:
  caddy:
	image: abiosoft/caddy
	ports:
	  - '8080:80'
	  - '443:443'
	depends_on:
	  - web
	volumes:
	  - ./.caddy:/root/.caddy
	  - ./conf/Caddyfile:/etc/Caddyfile

I get this error:

Recreating 7bca6949339e_docker-cabot_caddy_1 ... error
Recreating 7bca6949339e_docker-cabot_caddy_1 ...

ERROR: for 7bca6949339e_docker-cabot_caddy_1 Cannot start service caddy: driverCreating docker-cabot_worker_1 ... done
eb631a2673cff2ea0982a77fef50c90c713b4e8ae75761afcee080d40f33): Bind for 0.0.0.0:Creating docker-cabot_beat_1 ... done

ERROR: for caddy Cannot start service caddy: driver failed programming

Am I configuring my configuration files correctly?

Email Alerting possible only for HTTP Checks?

Hello,

From what I understand email alerts, etc are tied only to the service checks or is it possible to trigger email alerts without having a service defined for http check failures ? Also is there a way to change the content/customize the email content from the admin UI ?

Thanks in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.