GithubHelp home page GithubHelp logo

lxq's People

Contributors

19wolf avatar x1aaron avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

lxq's Issues

Salt and/or premade images?

I have been thinking about LXQ over the weekend and I thinking about other ways to deploy applications.

One thought I had was using Salt Stack.

Another thought I had was using premade images, then we could just pull the images in.

Thoughts?

What license is this under?

Hi, this looks cool. What license is this under? I realize this isn't a huge project yet, but it is important, since you are essentially cloning a copy into every users site. If some are using it for commercial purposes, as I plan to do, we would like to have our bases covered.

Thanks for the work!

Should be using git clone

Your scripts seem to be using wget from raw.github.com, you should just git clone the whole thing once, (and update it with git as needed), and just run from there.

git clone https://github.com/aaronstuder/lxq.git /opt/lxq/

lxq remove not work properly

Hi Aaron.

It seems to me that lxq remove is broken for installed on host kind of apps.

I installed cockpit but remove won't work:

root@lxd-server:~# lxq remove cockpit
ERROR: cockpit not found

I can fix my installation following and reversing the command in /opt/lxq/apps/cockpit/cockpit.install but it's not so comfortable.

spelling...

Setups LXD and creates a container with NGINX as a reserve proxy.

should be "reverse"

Aaron - you might want to look at some of the Bitnami applications

I've found that many/most of the Bitnami applications work fine in LXD containers.

https://bitnami.com/stacks/cloud

Click on the Bitnami application you are interested in.

Under DEPLOYMENT OFFERING... under ON MY COMPUTER

Click on the WIN/MAC/LINUX tab

And you will see on the far right a Button to download the Bitnami Installer for that app.

Once it has downloaded to your PC, copy it to the LXD container you made for it.

Create an LXD container for that Application

lxc exec <container_name> bash

chmod +x app_installer_name
then
execute app_installer_name

The Bitnami installer then does its job installing the applicaiton for you.

You may have to still open a port etc but from your Host you should be able to point your browser to what the Bitnami tells you and you then should be able to use that application.

Obviously, to reach those from the Internet you'd have to use LXD's Device Proxy command to redirect traffic to your Host into the Container but that's easy enough to do.

Just a thought but wanted to tell you about Bitnami in case you weren't aware of it.

suggestion: improve network interface name

Hi,

I made a little change in your script and I'd like to share it with you.

You assume in apps/nginx.rules that the network interface is eth0, but, nowday it often has another name.
Because this is very crucial for dnat success of the configuration, I propose this changing:

diff --git a/apps/nginx/nginx.rules b/apps/nginx/nginx.rules
index 6a12be6..1e7b0e1 100644
--- a/apps/nginx/nginx.rules
+++ b/apps/nginx/nginx.rules
@@ -1,2 +1,2 @@
-iptables -t nat -I PREROUTING -i eth0 -p TCP -d $PUBLIC_IP --dport 80 -j DNAT --to-destination $CONTAINER_IP:80
-iptables -t nat -I PREROUTING -i eth0 -p TCP -d $PUBLIC_IP --dport 443 -j DNAT --to-destination $CONTAINER_IP:443
\ No newline at end of file
+iptables -t nat -I PREROUTING -i $INTERFACE -p TCP -d $PUBLIC_IP --dport 80 -j DNAT --to-destination $CONTAINER_IP:80
+iptables -t nat -I PREROUTING -i $INTERFACE -p TCP -d $PUBLIC_IP --dport 443 -j DNAT --to-destination $CONTAINER_IP:443

and

diff --git a/lxq b/lxq
index 49eb7dc..daac463
--- a/lxq
+++ b/lxq
@@ -354,8 +354,11 @@ init() {
     mkdir /etc/lxq/
     echo "LXQ_INIT=TRUE" >> /etc/lxq/lxq.cfg
     PUBLIC_IP=`curl -s ifconfig.me`
+    INTERFACE=`ip link | awk -F: '$0 !~ "lo|vir|lxd|^[^0-9]"{print $2a;getline}'`
     echo "Public IP: $PUBLIC_IP"
     echo "PUBLIC_IP=$PUBLIC_IP" >> /etc/lxq/lxq.cfg
+    echo "Network Interface: $INTERFACE"
+    echo "INTERFACE=$INTERFACE" >> /etc/lxq/lxq.cfg
     $ECHO_GREEN"SUCCESS: LXQ init Complete!"$NC
     lxq install nginx null
   fi

I used as "recipe" to get the interface name this code:

ip link | awk -F: '$0 !~ "lo|vir|lxd|^[^0-9]"{print $2a;getline}'

It's seems correct to me, but could be even better (or maybe asking it during init process?)

Hope it's useful

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.