PHPackages                             ascio/ascio-framework - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. ascio/ascio-framework

ActiveLibrary

ascio/ascio-framework
=====================

PHP Framework for the Ascio-API. Sync, AutoQueue, Update, REST-API

v0.1(4y ago)29[1 issues](https://github.com/rendermani/ascio-framework/issues)MITCSSPHP &gt;=5.3.0CI failing

Since Sep 15Pushed 1y agoCompare

[ Source](https://github.com/rendermani/ascio-framework)[ Packagist](https://packagist.org/packages/ascio/ascio-framework)[ RSS](/packages/ascio-ascio-framework/feed)WikiDiscussions master Synced 5d ago

READMEChangelog (1)Dependencies (10)Versions (2)Used By (0)

Ascio-Framework
===============

[](#ascio-framework)

A php framework with docker to sync and connect to the ascio-api. Scalable, based on docker and kafka.

It makes make domain-management-processes easear like:

- Sync all data from ascio to the local databases in realtime.
- Auto-Queue blocking orders
- Scalable architecture
- Consume the poll-queue with multiple orders
- Provide one $domain-&gt;update functions. Change data, update, and all orders will be queued
- Auto unlock-relock
- REST-API:

Requirements
------------

[](#requirements)

The only requirement is docker. It can be downloaded here:

Installation
------------

[](#installation)

1. Clone repository: `git clone https://github.com/rendermani/ascio-framework.git ascio-framework`
2. `cd ascio-framework`
3. `chmod u+x bin/init.sh`
4. Run `bin/init.sh `. The github-token can be used optionally to extend quotas (Could not authenticate against github.com). It can be obtained here:
5. Set missing passwords in the **.env**
6. Enter the ascio-credentials in **config/accounts/default.json**
7. Run `bin/up.sh`

Initial database sync: ascio &gt; local
---------------------------------------

[](#initial-database-sync-ascio--local)

At the beginning the database is empty. As Ascio-messages are sent, when something changes, an initial sync must be done at the beginning. The sync-orders script syncs all orders and data that belongs to the orders, like Domains or SSL-Certificates.

- make sure the installation is complete, and **default.json** contains valid credentials and environment
- run `bin/sync-orders.sh`

Testing the installation
------------------------

[](#testing-the-installation)

At the beginning there will be a Kafka exception in the logs. This will be gone as soon as Kafka has fully loaded. There is no dependancy on Kafka, because the Kafka could run somewhere else.

- run `bin/logs.sh`. Look for 401 Authentification failed
- run `bin/php sandbox/create-order.php`
- observe the logs for poll complete.
- check the database:

Locations
---------

[](#locations)

- phpmyadmin:
- REST-API:

Commands
--------

[](#commands)

- Init framework, create tables, build: `bin/init.sh`
- Initials sync orders: `bin/sync-orders.sh`
- Start: `bin/up.sh`
- Stop: `bin/down.sh`
- Restart framework: `bin/restart-framework.sh`
- View logs: `bin/logs.sh`
- Docker shell: `docker exec -it ascio-framework-php bash`
- Execute php: `docker exec ascio-framework-php php sandbox/my-example.php`

Example Code
============

[](#example-code)

Examples are in the sandbox directory. Here some examples:

Autoqueue the next order when blocked
-------------------------------------

[](#autoqueue-the-next-order-when-blocked)

First a register-order is created and a domain is registered. By setting $submitOptions-&gt;setQueue(false) the order is directly submitted. After that a expire-order is sent. But as the asynchronous register orders is still running, the expire order is queued in the database and started when the register is completed.

```
