Code Monkey home page Code Monkey logo

slipstreamserverdeps's Introduction

Dependencies for SlipStream server.

slipstreamserverdeps's People

Contributors

0xbase12 avatar konstan avatar mebster avatar rbf avatar schaubl avatar sixsq-hudson avatar st avatar

Watchers

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

slipstreamserverdeps's Issues

[nginx] reduce the default numbits parameter to openssl dhparam to 1024

With the current 4096 it takes more than 18 min to generate and is done from the slipstream-server-nginx-conf RPM post-install script [1].

It takes too long and artificially increases deployment times in CI.

Proposed solution:

  1. change from 4096 to 1024 in the RPM post-install.
  2. If the need for a value higher 1024 is justified, update slipstream.sh with openssl dhparam -out /etc/nginx/ssl/dhparam.pem 4096 && systemctl restart nginx after the RPM installation, and probably only on enterprise edition.

[1]

  982 ?        Ssl    0:00 python /opt/slipstream/client/sbin/slipstream-node -v start
 1016 ?        S      0:00  \_ /bin/bash /var/lib/slipstream/module_slipstream_ss-ci-pipeline_ss-deployer_3535__deployment
 1021 ?        S      0:00      \_ /bin/bash ./ss-deployer.sh
22451 ?        S      0:00          \_ /bin/bash /tmp/ss-install-ref-conf.sh -r http://nexus.sixsq.com/service/local/artifact/maven/redirect?r=snapshots-enterprise-rhel7&g=com.sixsq.slipstream&a=SlipStre
22471 ?        S      0:00              \_ bash ./slipstream.sh -S -k snapshot -e community -d hsqldb
25012 ?        S      0:01                  \_ /usr/bin/python /usr/bin/yum install -y slipstream-server-nginx-conf-community
25137 ?        S      0:00                      \_ /bin/sh /var/tmp/rpm-tmp.Lzgroi 1
25153 ?        S      0:00                          \_ /bin/sh /opt/slipstream/server/sbin/generate-dh-params.sh
25154 ?        R     18:03                              \_ openssl dhparam -out /etc/nginx/ssl/dhparam.pem 4096

And indeed

[root@deployer1979c2a75-94bd-4990-9cba-2ecc2394cda1 ~]# openssl dhparam -out /tmp/blah.pem 4096
Generating DH parameters, 4096 bit long safe prime, generator 2
This is going to take a long time
.................................................................+......................................................................................+......................................................................................................................................................................^C
[root@deployer1979c2a75-94bd-4990-9cba-2ecc2394cda1 ~]#

rename riemann jar

The jar file name is currently SlipStreamServiceOfferAPI.jar. Change this to something more relevant.

update webui nginx configuration

Update the nginx webui configuration so that all URLs below /webui are routed to the single-page application at /webui/index.html.

riemann dependency

Move the riemann dependency from the enterprise repository to the community repository.

cleanup riemann module

  • move build of jar file to boot
  • clean up dependencies in main pom.xml file
  • update dependencies to (if any) to repo
  • add dependency on riemann to rpm (not done because riemann is not in an rpm repo)
  • move sources into rpm module
  • trigger rpm build on mac

build phantomjs rpm conditionally

On Mac Os , build would raise error because RPM utility is not present, but installing RPM would also make the build fail. Therefore the rpm build should be run conditionaly

phantomjs link missing

The installation of phantomjs is missing a link to /usr/bin/phantomjs. The pricing information providers will not run without this link.

create RPM package for phantomjs

Create an RPM package to facilitate the installation of phantomjs for pricing scrappers. This is also needed for unit testing in clojurescript.

pass SNI information to backend services

It would be useful to be able to associate a particular user session with a given virtual host. To do this, the SNI host information must be passed from nginx to the backend services. Add a request header to provide this information. The variable in nginx with this value is $ssl_server_name.

Elasticsearch backup fails with "[es_backup] missing"

It looks like it fails since the end of Sept'16

Wed Sep 28 16:30:01 UTC 2016
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   179  100   179    0     0   5659      0 --:--:-- --:--:-- --:--:--  5774
{"error":{"root_cause":[{"type":"repository_missing_exception","reason":"[es_backup] missing"}],"type":"repository_missing_exception","reason":"[es_backup] missing"},"status":404}

increase the allowed maximum size of a report

The maximum size of a report is limited by nginx to be around 1MB by default. This should be increased as logs can be rather large. Discuss what is a good limit (2MB, 5MB?) and change the default configuration.

The file to change is /etc/nginx/conf.d/slipstream-extra/limit-reports.block:

location ~ ^/reports/ {
    include conf.d/slipstream-proxy.params;

    limit_conn reportslimit 10;
    client_max_body_size 5M;
}

Use 5MB as the maximum for now. Developer votes ranged from 2MB to 10MB.

[backup] ES 5.x backup fails

[2017-02-27T08:11:48,434][INFO ][o.e.c.r.a.AllocationService] [e1TurZX] Cluster health status changed from [RED] to [GREEN] (reason: [shards started [[resources-index][1], [resources-index][2], [resources-index][0]] ...]).
[2017-02-27T08:27:25,472][INFO ][o.e.m.j.JvmGcMonitorService] [e1TurZX] [gc][941] overhead, spent [346ms] collecting in the last [1s]
[2017-02-27T08:27:30,415][INFO ][o.e.s.SnapshotShardsService] [e1TurZX] snapshot [es_backup:es.snapshot.185.19.28.68.2017-02-27t0827z/58ndiqI5Q7-nXLQyvVqjew] is done
[2017-02-27T08:27:30,811][WARN ][o.e.s.SnapshotsService   ] [e1TurZX] [es_backup:es.snapshot.185.19.28.68.2017-02-27t0827z/58ndiqI5Q7-nXLQyvVqjew] failed to finalize snapshot
org.elasticsearch.repositories.RepositoryException: [es_backup] concurrent modification of the index-N file, expected current generation [-1], actual current generation [0] - possibly due to simultaneous snapshot deletion requests
        at org.elasticsearch.repositories.blobstore.BlobStoreRepository.writeIndexGen(BlobStoreRepository.java:820) ~[elasticsearch-5.2.1.jar:5.2.1]
        at org.elasticsearch.repositories.blobstore.BlobStoreRepository.finalizeSnapshot(BlobStoreRepository.java:567) ~[elasticsearch-5.2.1.jar:5.2.1]
        at org.elasticsearch.snapshots.SnapshotsService$5.run(SnapshotsService.java:908) [elasticsearch-5.2.1.jar:5.2.1]
        at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:527) [elasticsearch-5.2.1.jar:5.2.1]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_121]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_121]
        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_121]
[2017-02-27T08:27:30,822][WARN ][r.suppressed             ] path: /_snapshot/es_backup/es.snapshot.185.19.28.68.2017-02-27t0827z, params: {repository=es_backup, wait_for_completion=true, snapshot=es.snapshot.185.19.28.68.2017-02-27t0827z}
org.elasticsearch.repositories.RepositoryException: [es_backup] concurrent modification of the index-N file, expected current generation [-1], actual current generation [0] - possibly due to simultaneous snapshot deletion requests
        at org.elasticsearch.repositories.blobstore.BlobStoreRepository.writeIndexGen(BlobStoreRepository.java:820) ~[elasticsearch-5.2.1.jar:5.2.1]
        at org.elasticsearch.repositories.blobstore.BlobStoreRepository.finalizeSnapshot(BlobStoreRepository.java:567) ~[elasticsearch-5.2.1.jar:5.2.1]
        at org.elasticsearch.snapshots.SnapshotsService$5.run(SnapshotsService.java:908) ~[elasticsearch-5.2.1.jar:5.2.1]
        at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:527) ~[elasticsearch-5.2.1.jar:5.2.1]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_121]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_121]
        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_121]

Allow to set SlipStream (via nginx) into maintenance mode and define custom error pages

The maintenance will do the following:

  • Return the correct HTTP code (503). So that search engines can handle that case correctly.
  • Display a meaningful message for users who try to connect to SlipStream.
  • Allow some IPs to bypass the maintenance mode.

The custom error pages allow to return the error in the format which has been requested.
By default, nginx always serves default error pages as HTML.

riemann service fails

The riemann service as deployed on Nuvla (v3.22) currently fails. This is because the sysconfig file references the wrong jar file. The jar file has changed from SlipStreamServiceOfferAPI.jar to SlipStreamRiemann.jar.

separate database and reports backups

The backup of the server should be split into two: one for the database and one for the reports. The database backup is critical. The report backup is less so.

nagios backup probe should only check backups

The current nagios backup probe actually does the full backup. This causes a problem because the backup and probe take longer than 60 seconds to complete now. Although the timeout can be extended in the definition of the probe, it cannot exceed the maximum timeout given in the NRPE configuration file on the client. The default for this parameter is 60 seconds. In any case, it is not a good idea to do significant calculations in a probe.

The implementation should be refactored such that a cron job executes the backup and the nagios probe only verifies that the backup has been done recently.

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.