Git Product home page Git Product logo

bundle-generator-service's Introduction

Bundle Generator Service

Service to transform AppStore Bundle Service's messages to BungleGen messages.

Environment Setup

You will need Python >=3.8 installed and configured. A Dockerfile is included that can be used to run Bundle Generator Service.

Quick Start

Start with Git clone.

$ git clone --recurse-submodules path_to_repo

Run localy with Docker Compose

$ docker-compose up -d --build

Check logs

$ docker-compose logs -f bundle-generator-service bundle-generator

Run localy scaleble version with Docker Compose. Since BundleGen/Bundle Generator Service runs as a RabbitMQ consumer, it is possible to run many instances of BundleGen/Bundle Generator Service. RabbitMQ will then distribute requests to each instance in a round-robin fashion.

$ docker-compose up -d --build --scale bundle-generator=4

Test Scripts

Test scripts are included for reference platforms to speed up the generation process.

Start process of messages generation:

python generator.py

Development

For development, you will need Python >=3.8 installed and configured. Once installed, then install project specific dependencies using Poetry.

Install all dependencies:

$ cd service
$ poetry install

Configuration

{
    "concurency": 2,
    "worker": {
        "in_decoder": "json",
        "out_encoder": "msgpack",
        "status_decoder": "msgpack",
        "status_encoder": "json",
        "in_queue": "bundlegen-service-requests",
        "out_queue": "bundlegen-requests",
        "status_queue": "bundlegen-service-status"
    },
    "storage": {
        "type": "s3",
    },
    "envs": [
        "BUNDLE_STORE_DIR",
        "NGINX_STORE_DIR"
    ],
    "headers": [
        "x-request-id"
    ],
    "templates_archive_name": "{platformName}_{firmwareVersion}_dac_configs.tgz",
    "message": {
        "uuid": "as_is:x-request-id",
        "platform": "as_is:platformName",
        "image_url": "as_is:ociImageUrl",
        "app_metadata": "literal:",
        "lib_match_mode": "literal:normal",
        "output_filename": "format_string:{appId}_{appVersion}_{platformName}_{firmwareVersion}",
        "searchpath": "format_string:{bundle_store_dir}/{x-request-id}",
        "outputdir": "or:encrypt|{nginx_store_dir}|{bundle_store_dir}"
    }
}

Copyright and license

If not stated otherwise in this file or this component's LICENSE file the following copyright and licenses apply:

Copyright 2023 LIBERTY GLOBAL

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.

bundle-generator-service's People

Contributors

ppietruszewski-consult-red avatar lukasz-andrzejak avatar

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.