Name: omaha-server
Owner: Brave Software
Description: Google Omaha server (as known as Google Update)
Created: 2018-04-08 19:11:57.0
Updated: 2018-05-08 23:25:29.0
Pushed: 2018-04-17 02:17:53.0
Homepage: http://www.crystalnix.com/case-study/google-omaha
Size: 14431
Language: Python
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
[](https://imagelayers.io/?images=crystalnix/omaha-server:master 'Get your own badge on imagelayers.io')
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:
do apt-get update
do apt-get install docker.io
do apt-get install python-paver python-pip
do pip install -U docker-compose
t clone https://github.com/Crystalnix/omaha-server.git
omaha-server
do paver up_local_dev_server
op server
do docker-compose stop
Open http://{DOCKER_HOST}:9090/admin/
admin
admin
Requirements:
virtualenv omaha-server
p install -r requirements/dev.txt
ver test
or
ver run_test_in_docker
Required userid
. Including user id into request
A command for generating fake data such as requests, events and statistics:
age: ./manage.py generate_fake_data [options] <app_id>
tions:
--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:
age: ./manage.py generate_fake_statistics [options]
tions:
--count=COUNT Total number of data values (default: 100)
manage.py generate_fake_statistics --count=3000
A command for generating fake live data:
age: ./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:
age: ./manage.py generate_fake_mac_live_data <app_name> <channel>
manage.py generate_fake_mac_live_data Application alpha
Requirements:
deploy
settings.yml.example settings.yml
To change Omaha-Server configuration, add the settings that you want to modify to the ebs.config
file. For example:
oy:
s_access_key: '**********'
s_secret_key: '**********'
cket: 'example-ebs-archives'
gion: 'us-east-1' # http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region
me: 'omaha-server'
scription: 'Omaha Server'
y_name: 'omaha_server'
lution_stack_name: '64bit Amazon Linux 2015.03 v1.4.3 running Docker 1.6.2' # optional default: '64bit Amazon Linux 2015.03 v1.4.3 running Docker 1.6.2'
stanceType: 't2.large' # optional default: t2.small http://aws.amazon.com/ec2/instance-types/
toscaling: # optional default: min=1 max=10
min: 4
max: 20
althcheck_url: '/admin/' # optional default: '/healthcheck/status/'
vironments:
omaha-server-private:
option_settings: # Configuration Options http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-options.html
'aws:autoscaling:launchconfiguration':
IamInstanceProfile: 'omaha-public'
SecurityGroups: 'omaha-server,omaha-server-private' # If you use Amazon VPC with Elastic Beanstalk so that your instances are launched within a virtual private cloud (VPC), specify security group IDs instead of a security group name.
'aws:ec2:vpc':
VPCId: 'vpc-bb6b9fdf'
Subnets: 'subnet-e386d5ba'
AssociatePublicIpAddress: 'true'
environment:
OMAHA_SERVER_PRIVATE: 'true'
SECRET_KEY: '**********'
DB_HOST: 'postgres.example.com'
DB_USER: 'omaha'
DB_NAME: 'omaha'
DB_PASSWORD: '**********'
AWS_STORAGE_BUCKET_NAME: 'omaha-server'
RAVEN_DNS: 'http://b3615b99118949dbae3c7d06e93fa74c:b8f1c35d08ef4bcaa6810b4d4cdd6fc0@sentry.example.com/2'
RAVEN_DSN_STACKTRACE: 'http://637c17c832f44663b381916d4e0cb34d:9df83034cdfb400f9ce7d47ae4a0cc0b@sentry.example.com/5'
REDIS_HOST: 'redis.example.com'
DB_PUBLIC_USER: 'omaha_public'
DB_PUBLIC_PASSWORD: 'omaha_public_password'
AWS_ROLE: 'omaha-private'
omaha-server-public:
option_settings:
'aws:autoscaling:launchconfiguration':
IamInstanceProfile: 'omaha-public'
SecurityGroups: 'omaha-server,omaha-server-public'
environment:
OMAHA_SERVER_PRIVATE: 'false'
SECRET_KEY: '**********'
DB_HOST: 'postgres.example.com'
DB_USER: 'omaha_public'
DB_NAME: 'omaha'
DB_PASSWORD: 'omaha_public_password'
AWS_STORAGE_BUCKET_NAME: 'omaha-server'
RAVEN_DNS: 'http://b3615b99118949dbae3c7d06e93fa74c:b8f1c35d08ef4bcaa6810b4d4cdd6fc0@sentry.example.com/2'
RAVEN_DSN_STACKTRACE: 'http://637c17c832f44663b381916d4e0cb34d:9df83034cdfb400f9ce7d47ae4a0cc0b@sentry.example.com/5'
REDIS_HOST: 'redis.example.com'
AWS_ROLE: 'omaha-public'
DJANGO_SETTINGS_MODULE: 'omaha_server.settings_prod'
| Environment variable name | Description | Default value | |—————————|———————-|—————————-| | APP_VERSION | App version | DEV | | DJANGO_SETTINGS_MODULE | | omaha_server.settings_prod | | SECRET_KEY | Django SECRET_KEY | | | HOST_NAME | Eb 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_DNS | Sentry url | | | RAVEN_DSN_STACKTRACE | Sentry url | RAVEN_DNS | | 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' |
nerate config file
thon main.py
s-deploy init
s-deploy deploy -e omaha-server-dev
Next, just add the following snippet to your file deploy/settings.yml
tp://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-options-general.html#command-options-general-elbloadbalancer
:elb:loadbalancer':
BalancerHTTPSPort: 443
BalancerSSLPortProtocol: HTTPS
ertificateId: arn:aws:acm:us-east-1:your-ssl-id # ToDo: change on your SSL ID
Finally, in the case if you want to redirect all HTTP traffic to HTTPS, you can add OMAHA_ONLY_HTTPS: true
to environment variables in the environment section.
Warning: Please, don't activate the redirection of HTTP to HTTPS if you don't enable HTTPS. It will lead to that an Omaha server won't be accessible.
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.