This guide will cover the Shopware Client Administration installation process.
The following system libraries/applications are required to install and run the Shopware Client Administration.
Since the Client Administration not only has a webfrontend that is served through a webserver but also uses background processes for potentially long running actions we need a little more infrastructure than the typical PHP application.
php setup.pharthrough the command line, follow the instructions of the setup
Important: This is intended to help you understand and not a fully secured production setting.
Since you should already be familiar with webserver setup from your past Shopware experience, we are showing you here the Client Administration specific background process setup.
sudo -i apt-get install software-properties-common apt-add-repository ppa:ansible/ansible apt-get update apt-get install supervisor apt-get install beanstalkd apt-get install ansible
First we enable the RPC access for supervisor. Start editing the file.
And paste this content:
[inet_http_server] port = *:9001 username = eca-supervisor-rpc password = eca-supervisor-rpc
This binds the Port 9001 to the supervisor RPC-API. To enable the configuration we need to restart the supervisor service.
service supervisor restart
Now the ECA has access to the current status of it's background processes.
Next we create a shell user under which the background processes will be executed
useradd eca-supervisor -s /bin/bash -m
Notice: Although it is not necessary to specify a shell for the deployment user, I found it very helpful for debugging purposes.
Now create a SSH key without a password for the eca-deploy user. Since it is an interactive command, make sure to save the key in
mkdir /home/eca-supervisor/.ssh ssh-keygen -t rsa -b 4096 -C "email@example.com" home/eca-supervisor/.ssh/example_ssh# chown eca-supervisor:eca-supervisor -R /home/eca-supervisor/.ssh
And register the ssh key with the ssh agent
eval "$(ssh-agent -s)" ssh-add /home/eca-supervisor/.ssh/example_ssh chmod 0600 /home/eca-supervisor/.ssh/example_ssh
Now we link the Client Administrations supervisor config to the supervisor service and restart it so the workers are executed.
ln -s _APPLICATION_PATH_/supervisord/background-process.conf.dist /etc/supervisor/conf.d/background-process.conf supervisorctl reload
Notice: Some supervisor configurations may only allow
*.conffiles to be enabled.
After following the shopware server guide you should now be able to connect without a password to a shopware server by executing
sudo -i -u eca-supervisor ssh eca-deploy@_HOST_
Notice: you should try this for all new servers, because it will also register the new Shopware Server as a known host.
Congratulations you now set up the background processes with a user that is capable of connecting to Shopware servers through a key file.