Root access to any container

Authorising root access to a Jelastic container

Some Jelastic containers do not have root access by default. It is possible to enable this access to containers of your choice by installing an add-on.

  1. Log in to your Jelastic Cloud dashboard
  2. Click the Import button in the top menu bar
  3. Go to the JPS tab
  4. Copy the following code and paste it into the JPS tab (Up to date source: http://owncloudpmo.demo.jelastic.com/index.php/s/2wNR2vGjE1aui51)
    version: 1.5
    type: update
    categories:
    - apps/dev-tools
    targetNodes:
      nodeGroup:
      - bl
      - cp  
      - sqldb
      - nosqldb
      - build
      - cache
      - extra
      
    name: Root Access
    logo: https://blog.jelastic.com/wp-content/uploads/2015/11/cs-scheme1.png
    homepage: https://docs.jelastic.com/
    description:
      short: Enable a full root access to your container
      text: The Root Access add-on reconfigures the container to provide you with a full root access. Be aware that such connection is extremely powerful and, if used inappropriately, may lead to your container / application failure. **Proceed on your own risk and only in case you know exactly what to do.**
      
    onUninstall:
      cmd [${targetNodes.nodeGroup}]:
      - sed -i -e 's/.*NOPASSWD.*//g' /etc/sudoers.d/sudo
      user: root
    onInstall:
      cmd [${targetNodes.nodeGroup}]:
      - 'USER=$(grep -i ''x:''$(cat /etc/passwd | grep jelastic:x | cut -d'':'' -f 3) /etc/passwd | grep -v jelastic:x | cut -d: -f1)'
      - 'touch /etc/sudoers.d/sudo'
      - 'echo "$USER ALL=NOPASSWD: ALL" >> /etc/sudoers.d/sudo'
      - 'echo "jelastic ALL=NOPASSWD: ALL" >> /etc/sudoers.d/sudo'
      user: root
        
    success:
      text: |
        The Root Access add-on was successfully installed. Access your container over SSH and run the **sudo su** command. *Note:*
        Jelastic is not liable for any actions performed or damage caused via root to your container / application.
      email: false
    startPage: ${env.url}
  5. Click the Import button
  6. Choose the environment and node for which root access is necessary
  7. Click the Install button
  8. To execute root commands, log in to your application via SSH and launch the "sudo su" command.
    sudo su​
  • 0 Utenti hanno trovato utile questa risposta
Hai trovato utile questa risposta?

Articoli Correlati

Installing node.js in Appserver containers

Adding node.js to installed Appserver containers For node.js v14.x: # Using Ubuntu curl -sL...