ISPConfig 3 and AWS Elastic Load Balancing?

Discussion in 'General' started by Lee80, Dec 31, 2020.

  1. Lee80

    Lee80 New Member

    Hi all,
    I’m new to ISPConfig 3 - I wanted to see if I understand something correctly, about the multi-server feature...

    If I set up an aws instance running centOS / lamp / ISPConfig - would this server then be capable of managing another instance with just LAMP installed through the ISPConfig interface?

    OR - do I duplicate the first instance with ISPConfig installed, and have two instances with ISPConfig - and one is capable of updating/controlling the other?

    Has anyone any advice on using aws elastic load balancing with ISPConfig?

    I’m not sure if I’m expecting more, but I’m hoping there is a way of having one server with a web admin/control panel - that can be used to manage/update/change settings of other servers in the load balancer, as apposed to what I think cPanel suggested - and that is just run two identical instances, that both need to be logged into, and kept up to date manually. It doesn’t seem the best way if you had 5 old balanced instances.

    thanks for reading and any advice!

    Happy new year to you all!
     
  2. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

  3. Lee80

    Lee80 New Member

    Thanks for your fast reply - if I get it working, I’ll happily replicate the process and take screenshots and help with the guide.

    I’ll give it a try soon
     
  4. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Alright, keep us posted :)
     
    Lee80 likes this.
  5. Lee80

    Lee80 New Member

    Well your guide: The Perfect Server CentOS 7.6
    Is still working perfect for CentOS 7.9 on AWS EC2 - Thank you so much for such a detailed guide!!

    I missed some steps out:
    • Steps 1 to 3 were not needed on AWS.
    • Step 16 I did not install Webalizer, AWStats
    • Step 20 I did not install mailman
    • Step 21 I did not install Roundcube webmail
    I take it that is ok???

    (Just a note for anyone else wanting to install on an aws instance - the t2.micro (free tier) does not have enough memory - I had to use t2.medium. The memory requirements are probably documented somewhere - but i wanted to try and install it on the free aws option :) )

    I'm going to try and duplicate this instance now - and link them together.

    Possibly a stupid question - But in the tutorial, "hostname" is always put as server1.example.com
    So I did my hostname as:
    Code:
    server1.my-domain.net
    Should I just have it as:
    Code:
    my-domain.net
    ???

    I am accessing ispconfig through the IP address now :
    Code:
    http://ip:8080
    I cannot use my domain name, as it is still running our site on a cpanel setup - I want to transfer to our new ispconfig setup once it is all ready.

    Thanks again.
     
    Last edited: Jan 1, 2021
  6. Lee80

    Lee80 New Member

    I got stuck pretty early in this guide - I think it is because by default an AWS Instance is protected with a private key for log in.

    So, editing vi /etc/ssh/sshd_config
    was already: PermitRootLogin yes

    Creating the key was ok, but transfering it to server2:
    Code:
    ssh-copy-id -i /root/.ssh/id_rsa.pub [email protected]
    (192.168.0.106 replaced with my 2nd server IP)
    (also tried [email protected] - as centos is root username)

    Always came back with:
    Code:
    /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already insta                         lled
    /usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the ne                         w keys
    Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
    
    Because the key aws created for me to access ssh - is that blocking the ssh-copy from working?

    Thanks again for the help!
     
  7. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    To someone not familiar with AWS, that seems confusing (probably a typo?) ;)

    For your hostname, keep the 'server1' part, do not use just the domain name.

    For your ssh key, it did not prompt you for the root password? Does AWS give you an interface to add additional keys?
     
  8. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    It should always be a subdomain of your domain, never the root domain.

    The perfect server guide is fine, but doesn't describe multiservers installs - that's what I meant before.

    I would not use CentOS for a new setup personally, seeing the recent developments around CentOS. I use Debian myself - just a note.
     
  9. Lee80

    Lee80 New Member

    I read into it a bit before making the choice - and thought centOS was more for servers, while Debian is more for desktop users.
    I have no experience of Linux, so it’s no difference for me. We can use Debian if that is recommend. Can you say why you think that would be the better choice?

    We are hoping to transfer our popular website to our new load balanced set up as soon as possible.

    Once logged in with user centOS and private key, I used the command “SU” to switch to root user (which asked for a password)

    But I cannot get access to server2 from server1 - as server2 is already protected by the key AWS created.

    I’m going to try again today! Happy new year all!
     
  10. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    To me, any PST you follow should be fine but preferably with the latest OS version except for easy learning and implementation, Debian and Ubuntu are most preferred.

    AWS is ok and long time ago when I was testing it, it works just fine with ISPConfig, but after testing several VPS providers, I ended with Hertzner.

    Some say cloud server like AWS is better because of ability to load balance geographically, but it only means if you are having the whole worldwide users using your services and great need for such balancing.

    Otherwise, any good VPS from any location around the world with best internet connection will be just fine.

    About your ssh problem, just read your AWS manual, otherwise any linux guides about ssh, especially from howtoforge should be good enough to resolve that problem.
     
  11. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    I got used to Debian, it works very well and I haven't seen any big problems in the releases. It is used by many hosting providers around the world. CentOS is shifting to "CentOS stream", so there won't be a normal release to follow up the latest (CentOS 8).
     
  12. nhybgtvfr

    nhybgtvfr Active Member

    aws instances ( at least debian/ubuntu, i try to avoid centos) by default, will not allow direct ssh access as root.
    if you try it, you'll usually see a message telling you why..
    you should instead ssh as the OS, eg [email protected] or [email protected], so i guess for you it would be [email protected] and then once in, sudo to root.
    of course, once you've done that, you can put whatever you want in /root/.ssh/authorized_keys, so you can directly ssh in as root with various keys. although for security purposes, i would recommend just leaving it how aws has it currently.
     

Share This Page