Skip to main content

MACH composer

Project description

Documentation: docs.machcomposer.io

MACH composer is a framework that you use to orchestrate and extend modern digital commerce & experience platforms, based on MACH technologies and cloud native services. It provides a standards-based, future-proof tool-set and methodology to hand to your teams when building these types of platforms.

It includes:

  • A configuration framework for managing MACH-services configuration, using infrastructure-as-code underneath (powered by Terraform)
  • A microservices architecture based on modern serverless technology (AWS Lambda and Azure Functions), including (alpha) support for building your microservices with the Serverless Framework
  • Multi-tenancy support for managing many instances of your platform, that share the same library of micro services
  • CI/CD tools for automating the delivery of your MACH ecosystem
  • Tight integration with AWS an Azure, including an (opinionated) setup of these cloud environments

The framework is intended as the 'center piece' of your MACH architecture and incorporates industry best practises such as the 12 Factor Methodology, Infrastrucure-as-code, DevOps, immutable deployments, FAAS, etc.

With combining (and requiring) these practises, using the framework has significant impact on your engineering methodology and organisation. On the other hand, by combining those practises we believe it offers an accelerated 'way in' in terms of embracing modern engineering practises in your organisation.

Getting started

Read our getting started guide on how to deploy your MACH stack with MACH composer.

Example yaml file

---
mach_composer:
  version: '1.1'
global:
  environment: test
  cloud: aws
  terraform_config:
    aws_remote_state:
      bucket: mach-tfstate-tst
      key_prefix: mach-composer-tst
      region: eu-central-1
sites:
  - identifier: my-site
    aws:
      account_id: 1234567890
      region: eu-central-1
    endpoints:
      public: api.tst.mach-example.net
    commercetools:
      project_key: my-site-tst
      client_id: ...
      client_secret: ...
      scopes: manage_project:my-site-tst manage_api_clients:my-site-tst view_api_clients:my-site-tst
      token_url: https://auth.europe-west1.gcp.commercetools.com
      api_url: https://api.europe-west1.gcp.commercetools.com
      project_settings:
        languages:
          - en-GB
          - nl-NL
        currencies:
          - GBP
          - EUR
        countries:
          - GB
          - NL
    components:
      - name: payment
        variables:
          STRIPE_ACCOUNT_ID: 0123456789
        secrets:
          STRIPE_SECRET_KEY: secret-value
components:
  - name: payment
    source: git::ssh://git@github.com/your-project/components/payment-component.git//terraform
    endpoints:
      main: public
    version: e638e57

Installation

  • Make sure you have Terraform 0.14 installed (tip: Use tfenv to support multiple versions of Terraform)
  • Create a new virtualenv with Python 3.8
  • Run the following commands:
$ make install

Running MACH

To generate the files:

mach generate # generates all available configs.

mach generate -f main.yml

To init Terraform (optional):

mach init

To plan Terraform:

mach plan

To apply Terraform config:

mach apply

Checking for updates

MACH can check your components for available updates.

To do this, run:

mach update -f main.yml

Contributing

Code style

The Python source code should be formatted using black and the JavaScript code should be formatted using prettier. You can use make format to run both black and prettier.

This project uses pre-commit to validate the changed files before they are committed. You can install it on MacOS using brew:

$ brew install pre-commit

In the repository you need to register the hooks in git the first time using:

$ pre-commit install

The pre-commit config (.pre-commit-config.yaml) currently runs black and flake8.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mach-composer-1.2b2.tar.gz (38.6 kB view details)

Uploaded Source

Built Distribution

mach_composer-1.2b2-py3-none-any.whl (51.4 kB view details)

Uploaded Python 3

File details

Details for the file mach-composer-1.2b2.tar.gz.

File metadata

  • Download URL: mach-composer-1.2b2.tar.gz
  • Upload date:
  • Size: 38.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.1

File hashes

Hashes for mach-composer-1.2b2.tar.gz
Algorithm Hash digest
SHA256 1c008e6e83b1bf56f055478d2cf280b6a54a951c3a6f25f609158a2cfb1d133b
MD5 a45f36ba926f3a9c9e7fcb1668506820
BLAKE2b-256 06ca288ad1a3fd104a83eb9c75689dffcee953850f25aafb1097649155bf3646

See more details on using hashes here.

File details

Details for the file mach_composer-1.2b2-py3-none-any.whl.

File metadata

  • Download URL: mach_composer-1.2b2-py3-none-any.whl
  • Upload date:
  • Size: 51.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.1

File hashes

Hashes for mach_composer-1.2b2-py3-none-any.whl
Algorithm Hash digest
SHA256 f6a1d0f80ec2465b7a64e3722ab1a2f7941d68b0bdc1799b284e0e44e37d547b
MD5 e2f0644cee59d4e9488bf62683a4b5f9
BLAKE2b-256 970584da47aab8e64e977ede88d9040293977e6b606761a5161eb4be993c2d93

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page