alt3 / cakebox-console Goto Github PK
View Code? Open in Web Editor NEWApplication sources for the Cakebox console and dashboard
License: MIT License
Application sources for the Cakebox console and dashboard
License: MIT License
Easily update self
As discussed it might be smart to replace the CakePHP Console with an alternative solution/library more dedicated to the task like Symfony's Console Component.
Also impacts #85.
debugkit composer version should become ~3.0 when 3.0.1 is released, its pinned to dev-master atm to includes a fix to make php7 happy on travis
The VM page should get an extra ajax-loaded tab named "Logs" displaying the /var/log/cakebox/cakebox.cli.log
file.
Ideally stripping/reformatting the Monolog format for easier reading.
Working ajax-loading examples already present in the same controller/views.
BackupShell already implemented and creates a full hot database server backup using Percona XtraBackup.
RestoreShell needs to be implemented and should be able to:
The current installer is too coupled and should be refactored into an Interface Class so multiple frameworks can be added to the box as Adapter Classes.
Will probably also sort out #59.
HHVM is already installed and ready for use inside the box so it's just a matter:
Cakebox now appears in the list of "Applications" which is confusing.
@ceeram ๐
Not really sure if this is needed and if so, how.
Use cases found in the wild:
Instead of the current "vm page reload" > click log tab.
No time to look into the JS right now, but it looks like a NotFoundException
is being thrown when I try deleting a vhost.
OS Host: MacOS X 10.10.5 (freshly updated)
VirtualBox Version: 4.3.26 (r98988)
Vagrant Version: 1.7.2
Cakebox version: v1.0.alpha3 (has shown in Web Interface)
When I go to my cakebox/Apps folder, all my "websites" folder aren't accessible.
Here's the log when I perform the vagrant up
command:
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 22 => 2222 (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Connection timeout. Retrying...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Setting hostname...
==> default: Configuring and enabling network interfaces...
==> default: Mounting shared folders...
default: /vagrant => /Users/Drew/Documents/dev/cakebox/.vagrant
default: /cakebox => /Users/Drew/Documents/dev/cakebox/.cakebox
default: /home/vagrant/Apps => /Users/Drew/Documents/dev/cakebox/Apps
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: to force provisioning. Provisioners marked to run always will still run.
==> default: Machine 'default' has a post `vagrant up` message. This is a message
==> default: from the creator of the Vagrantfile, and not from Vagrant itself:
==> default:
==> default: Your box is ready and waiting.
==> default:
==> default: => Login to your Dashboard by browsing to http://10.33.10.10
==> default: => Login to your virtual machine by running: vagrant ssh
Extend the site_files pages with ajax-loading modals for the Nginx logs (per application).
To implement... just follow the logic implemented for the configuration file modal.
Cakebox Salt/cipher is currently hardcoded in the repo. Should:
cakephp/app no longer requires -s dev
since it is now stable
cakebox-console/src/Lib/CakeboxExecute.php
Line 214 in 9ba2a11
Purely hypothetical placeholder but should be do'able using dynamic IP-ranges, generating certificates. Probably requires some sort of tracking mechanism.
Change must be isolated without breaking BC by using Cakebox.yaml settings
Real bug, not working as designed. Reproducable using a yaml with:
synced_folders:
- local: /git/mycake3.app
remote: /var/www/mycake3.app
apps:
- url: mycake3.app
options: --path /var/www/mycake3.app
vagrant reload --provision
Directory did not pass readiness test
messageThe current "one generic Nginx virtual host for all frameworks" implementation needs to be refactored to prepare for (easy) extending the number of supported (PHP) frameworks.
Per framework:
For general use:
Additionally:
cakebox site add
command to specify frameworkcakebox site add
command to specify php/hhvmThe "recent contributions" on the Dashboard page are fetched from the google API here https://github.com/alt3/cakebox-console/blob/dev/src/Lib/CakeboxInfo.php#L960.
In LAN-less mode (cakebox without external network connectivity on local machine) it now generates an error breaking the dashboard so a check should be build in.
Currently cakebox can be provisioned with debug set to true. This will enable debug in console application. Composer install however is done with --no-dev
, meaning that autoloading for tests and fixtures is never loaded.
I suggest to change debug config name to something like develop: true/false
If develop is true, console debug level will be set to true, composer install will be done without --no-dev
, so that autoloading for autoload-dev
will also be generated.
Additionally we can move things like bake and debug_kit to required-dev, so that they wont be installed and included in autoloading when installing with develop: false
This change will also require changes to alt3/cakebox
elastic search seems not to be running, perhaps needs fixing in alt3/cakebox?
Would be cool if someone could create an alpha version of the current image so it matches the releases.
Console logging uses normal and verbose.
File logging should just write everything without outputting to screen.
Current Shell headers:
==> default: ---------------------------------------------------------------
==> default: CakePHP v3.0.0-RC2 Console
==> default: ---------------------------------------------------------------
User feedback indicates it's annoying and that provisioning readability could be improved by changing it to something like this:
==> default: ---------------------------------------------------------------
==> default: Creating application http://cake3.app
==> default: ---------------------------------------------------------------
==> default: ---------------------------------------------------------------
==> default: Installing additional apt package 'dos2unix'
==> default: ---------------------------------------------------------------
See label
As suggested by @ceeram for easy gisting of cli.logfile, vhost, etc.
cakebox gist log
cakebox gist vhost mycake3.app
vagrant@cakebox:~$ cakebox
PHP Fatal error: Uncaught Error: Call to undefined function mb_internal_encoding() in /cakebox/console/config/bootstrap.php:92
any cakebox command now doesnt work anymore.
Add info on increasing number of cpus in http://10.33.10.10/dashboard/vm#panel-summary performance section
Maxing the number of cpus helps performance without making host crash, while maxing memory might crash the host. so max memory up to 25% of host, max cpu equals the number of cpus of the host.
From virtualbox documentation:
You should not, however, configure virtual machines to use more CPU cores than you have available physically (real cores, no hyperthreads).
Reminder, is caused by this issue
With current 3.4 and PHP7.2:
http://10.33.10.10/
=> Warning (2): count(): Parameter must be an array or an object that implements Countable [CORE/src/Database/QueryCompiler.php, line 128]
Could just work as is but needs testing
YAML.parse(open('https://link_to_file/file.yaml'))
Should not require (yet another) local file. Maybe user input during vagrant up/reload or by parsing an env variable.
Renaming poorly chosen "sites" to "vhosts" should clarify intended use and recognition throughout the code.
Implement together with alt3/cakebox#38.
we should find better/saner defaults for current usage and use cases.
With medium apps you get this very soon from the start:
The following exception is caused by a lack of memory or swap, or not having swap configured
Check https://getcomposer.org/doc/articles/troubleshooting.md#proc-open-fork-failed-errors for details
[ErrorException]
proc_open(): fork failed - Cannot allocate memory
As per https://getcomposer.org/doc/articles/troubleshooting.md#proc-open-fork-failed-errors
This could be happening because the VPS runs out of memory and has no Swap space enabled.
running 'top' in parallel tells me, though:
KiB Mem : 1745168 total, 1271028 free, 347604 used, 126536 buff/cache
KiB Swap: 786428 total, 482516 free, 303912 used. 1254120 avail Mem
Seems like there is still enough free, so whats going on if it isnt the memory running out?
Should be possible for MySql using Percona XtraBackup
Merged PRs from the cakebox
project are not displayed on the Dashboard as discussed here alt3/cakebox#55.
cakebox database add
uses the same --username and --password options for both main and test databases. Requires extending options and DatabaseTask.
Should support all three update points:
Required comparison data already uploaded to ~/.cakebox.
Dashboard "most recent contributions" are now sorted by PR creating date, should be changed to merge date.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.