Giter Club home page Giter Club logo

service-command's Introduction

easyengine/service-command

Command to manager global containers/services in EasyEngine

Quick links: Using | Contributing | Support

Using

This package implements the following commands:

ee service

Manages global services of EasyEngine.

ee service

EXAMPLES

# Restarts global nginx proxy service
$ ee service restart nginx-proxy

ee service enable

Starts global services.

ee service enable <service-name>

OPTIONS

<service-name>
	Name of service.

EXAMPLES

# Enable global service
$ ee service enable nginx-proxy

ee service disable

Stops global services.

ee service disable <service-name>

OPTIONS

<service-name>
	Name of service.

EXAMPLES

# Disable global service
$ ee service disable nginx-proxy

ee service restart

Restarts global services.

ee service restart <service-name>

OPTIONS

<service-name>
	Name of service.

EXAMPLES

# Restart global service
$ ee service restart nginx-proxy

ee service reload

Reloads global service without restarting services.

ee service reload <service-name>

OPTIONS

<service-name>
	Name of service.

EXAMPLES

# Reload global service
$ ee service reload nginx-proxy

Contributing

We appreciate you taking the initiative to contribute to this project.

Contributing isn’t limited to just code. We encourage you to contribute in the way that best fits your abilities, by writing tutorials, giving a demo at your local meetup, helping other users with their support questions, or revising our documentation.

Reporting a bug

Think you’ve found a bug? We’d love for you to help us get it fixed.

Before you create a new issue, you should search existing issues to see if there’s an existing resolution to it, or if it’s already been fixed in a newer version.

Once you’ve done a bit of searching and discovered there isn’t an open or fixed issue for your bug, please create a new issue. Include as much detail as you can, and clear steps to reproduce if possible.

Creating a pull request

Want to contribute a new feature? Please first open a new issue to discuss whether the feature is a good fit for the project.

Support

Github issues aren't for general support questions, but there are other venues you can try: https://easyengine.io/support/

This README.md is generated dynamically from the project's codebase using ee scaffold package-readme (doc). To suggest changes, please submit a pull request against the corresponding part of the codebase.

service-command's People

Contributors

abhijitrakas avatar dhsathiya avatar dishitpala avatar kirtangajjar avatar mbtamuli avatar mrrobot47 avatar rahulsprajapati avatar sagarnasit avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

service-command's Issues

Add support for all plugins in newrelic

By default, EasyEngine should configure all new relic plugins upon installation. Following plugins are required per site:

  • Nginx(site)
  • Nginx(proxy)
  • PHP
  • MySQL
  • Redis

Get newrelic key from ee config

Currently we have to add newrelic key individually for each site. There should also be a single config key(i.e. newrelic-key) which will add same key in all the sites

Mount global db to correct path

Currently it's being mount at /opt/easyengine/services/app/db instead it should be mounted at /opt/easyengine/services/db

Fix log mount of nginx-proxy

access and error logs of nginx-proxy point to /dev/stdout and /dev/stderr.

l /opt/easyengine/services/nginx-proxy/logs/
total 8.0K
drwxr-xr-x 2 root root 4.0K Jan  2 03:58 .
drwxr-xr-x 3 root root 4.0K Jan  2 03:58 ..
lrwxrwxrwx 1 root root   11 Nov  7 00:27 access.log -> /dev/stdout
lrwxrwxrwx 1 root root   11 Nov  7 00:27 error.log -> /dev/stderr

We need to mount them correctly.

"Service already running" should not be a warning

Every time we create a wp site, just in the beginning we notice these two warnings -

Warning: global-redis: Service already running
Warning: global-db: Service already running

By looking at it, It seems that something is not right. These should not be warnings, but simple info messages or rather we shouldn't even display something as trivial as this, we can simply add it in log file.

Fatal error

The latest develop branch code fails

ee service enable nginx-proxy
PHP Fatal error:  Uncaught Error: Call to undefined function EE\Service\Utils\nginx_proxy_check() in /home/rttest/easyengine/vendor/easyengine/service-command/src/Service_Command.php:55
Stack trace:
#0 [internal function]: Service_Command->enable(Array, Array)
#1 /home/rttest/easyengine/php/EE/Dispatcher/CommandFactory.php(96): call_user_func(Array, Array, Array)
#2 [internal function]: EE\Dispatcher\CommandFactory::EE\Dispatcher\{closure}(Array, Array)
#3 /home/rttest/easyengine/php/EE/Dispatcher/Subcommand.php(425): call_user_func(Object(Closure), Array, Array)
#4 /home/rttest/easyengine/php/EE/Runner.php(276): EE\Dispatcher\Subcommand->invoke(Array, Array, Array)
#5 /home/rttest/easyengine/php/EE/Runner.php(299): EE\Runner->run_command(Array, Array)
#6 /home/rttest/easyengine/php/EE/Runner.php(722): EE\Runner->_run_command_and_exit()
#7 /home/rttest/easyengine/php/EE/Bootstrap/LaunchRunner.php(23): EE\Runner->start()
#8 /home/rttest/easyengine/php/bootstrap.php(75): EE\Bootstrap\LaunchRunner->process(Object(EE\Boots in /home/rttest/easyengine/vendor/easyengine/service-command/src/Service_Command.php on line 55

newrelic-daemon does not take new key once setup

Steps to reproduce:

  1. Create 2 newrelic account.
  2. Configure newrelic with first account as shown in https://easyengine.io/handbook/configure-new-relic-in-ee4
  3. Wait for newrelic to show data
  4. Now change the key to that of 2nd account.
  5. Disable and enable site and reload(or stop, kill and start) newrelic daemon container.

Expected output:
The site is registered in 2nd account.

Actual output:
The site is registered in 1st account and does not get re-registered in 2nd account.

I additionally verified it by tailing /var/log/newrelic/newrelic-daemon.log in newrelic daemon while it was starting up in step 5.

enbaling service fails

Enabling global service fails when /opt/easyengine/services directory has not been created yet. This happens for global services other that nginx-proxy.

So either boot nginx-proxy in this case or add the checks and steps required of proper docker-compose.yml generation for all types of services.

Also, global service ee-global-mariadb needs to be renamed to ee-global-db.

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.