Google Omaha server implementation and Sparkle (mac) feed management.
Currently, our implementation is integrated into the updating processes of several organisations for products that require sophisticated update logic and advanced usage statistics. We provide additional support and further enhancement on a contract basis. For a case study and enquiries please refer our website
Requirements:
- Ubuntu Trusty 14.04 (LTS) (64-bit)
- pipenv
- docker or boot2docker for OS X & Windows
- docker-compose
$ sudo apt-get update
$ sudo apt-get install docker.io
$ sudo apt-get install python python-pip
$ sudo pip install -U pipenv
$ sudo pip install -U docker-compose
$ git clone https://github.com/brave/omaha-server.git
$ cd omaha-server
# Up local environment
$ make up
# Stop server
$ make stop
Open http://{DOCKER_HOST}:9090/admin/
- username:
admin
- password:
admin
Requirements:
- python 3.7
- pipenv
- PostgreSQL
- Redis
$ sudo pip install -U pipenv
$ make install-dev
$ pipenv shell
$ make test
All statistics are stored in Redis. In order not to lose all data, we recommend to set up the backing up process. The proposed solution uses ElastiCache which supports automatic backups. In the case of a self-hosted solution do not forget to set up backups.
Required userid
. Including user id into request
A command for generating fake data such as requests, events and statistics:
# Usage: ./manage.py generate_fake_data [options] <app_id>
# Options:
# --count=COUNT Total number of data values (default: 100)
$ ./manage.py generate_fake_data {F07B3878-CD6F-4B96-B52F-95C4D2} --count=20
A command for generating fake statistics:
# Usage: ./manage.py generate_fake_statistics [options]
# Options:
# --count=COUNT Total number of data values (default: 100)
$ ./manage.py generate_fake_statistics --count=3000
A command for generating fake live data:
# Usage: ./manage.py generate_fake_live_data <app_id>
#
$ ./manage.py generate_fake_live_data {c00b6344-038f-4e51-bcb1-33ffdd812d81}
A command for generating fake live data for Mac:
# Usage: ./manage.py generate_fake_mac_live_data <app_name> <channel>
#
$ ./manage.py generate_fake_mac_live_data Application alpha
Requirements:
- Sentry + SetUp Sentry as self-hosted solution + Sentry as SaaS solution
- AWS RDS: Creating a DB Instance Running the PostgreSQL Database Engine
- Redis instance in AWS ElasticCache: Documentation
- AWS S3: Create a Bucket
- AWS Access Key ID and Secret Access Key
Environment variable name | Description | Default value |
---|---|---|
APP_VERSION | App version | DEV |
DJANGO_SETTINGS_MODULE | omaha_server.settings | |
SECRET_KEY | Django SECRET_KEY | |
HOST_NAME | App host name | |
DB_HOST | DB Host | 127.0.0.1 |
DB_USER | DB User | postgres |
DB_NAME | DB Name | postgres |
DB_PASSWORD | DB Password | '' |
DB_PORT | DB port | 5432 |
AWS_ACCESS_KEY_ID | AWS Access Key | |
AWS_SECRET_ACCESS_KEY | AWS Secret Key | |
AWS_STORAGE_BUCKET_NAME | S3 storage bucket | |
RAVEN_DSN | Sentry url | |
RAVEN_DSN_STACKTRACE | Sentry url | RAVEN_DSN |
REDIS_HOST | Redis host | 127.0.0.1 |
REDIS_PORT | Redis port | 6379 |
REDIS_DB | Redis db | 1 |
REDIS_STAT_PORT | For statistics | REDIS_PORT |
REDIS_STAT_HOST | REDIS_HOST | |
REDIS_STAT_DB | 15 | |
UWSGI_PROCESSES | ||
UWSGI_THREADS | ||
OMAHA_SERVER_PRIVATE | Is private server | False |
DB_PUBLIC_USER | ||
DB_PUBLIC_PASSWORD | ||
AWS_ROLE | ||
OMAHA_URL_PREFIX | no trailing slash! | |
SENTRY_STACKTRACE_API_KEY | Auth API token | |
OMAHA_ONLY_HTTPS | HTTPS-only | False |
CUP_REQUEST_VALIDATION | False | |
CRASH_TRACKER | Sentry, ELK | Sentry |
LOGSTASH_HOST | Logstash host | |
LOGSTASH_PORT | Logstash TCP port | |
FILEBEAT_HOST | Filebeat host | 127.0.0.1 |
FILEBEAT_PORT | Filebeat UDP port | 9021 |
ELK_HOST | Logstash host | '' |
ELK_PORT | Logstash TCP port | '' |
FILEBEAT_DESTINATION | filebeat output type | '' |
LOG_NGINX_TO_FILEBEAT | Send logs to filebeat | 'True' |
EMAIL_SENDER | Verified SES email | |
EMAIL_RECIPIENTS | Feedback recepients | |
RSYSLOG_ENABLE | Send logs to rsyslog | '' |
- uWSGI Options & Environment variables
- Sentry
- Sentry API key is stored on the way Sentry Organization page -> API Keys
- Use Omaha eckeytool to generate private.pem key and cup_ecdsa_pubkey.{KEYID}.h files.
- Add cup_ecdsa_pubkey.{KEYID}.h to Omaha source directory /path/to/omaha/omaha/net/, set CupEcdsaRequestImpl::kCupProductionPublicKey in /path/to/omaha/omaha/net/cup_ecdsa_request.cc to new key and build Omaha client.
- Add private.pem keyid and path to omaha CUP_PEM_KEYS dictionary.
Thanks to Abiral Shrestha for the security reports and suggestions.
This software is licensed under the Apache 2 license, quoted below.
Copyright 2014 Crystalnix Limited
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.