Exposing StarRocks allin1 container to the internet using serveo

What is servo?

It’s a way to expose local servers to the internet. https://serveo.net/

Launch the StarRocks allin1 container

docker run -p 9030:9030 -p 8030:8030 -p 8040:8040 -itd --name=starrocks -v starrocks-storage-be:/data/deploy/starrocks/be/storage -v starrocks-storage-fe:/data/deploy/starrocks/fe/meta starrocks/allin1-ubuntu

Run serveo

I’m picking abc.serveo.net has my domain. You can pick any subdomain you’d like.

ssh -R 9030:localhost:9030 -R 8030:localhost:8030 -R 8040:localhost:8040 abc.serveo.net

You’ll this as your results:

atwong@Alberts-MBP Downloads % ssh -R 9030:localhost:9030 -R 8030:localhost:8030 -R 8040:localhost:8040 abc.serveo.net
Forwarding TCP connections from serveo.net:9030
Forwarding TCP connections from serveo.net:8030
Forwarding TCP connections from serveo.net:8040

Now you can access your local StarRocks container on the internet at http://abc.serveo.net:8030/ and other ports.

If you get an error like

ssh -R 8040:localhost:8040 star.serveo.net
Warning: remote port forwarding failed for listen port 8040

Try a different port

ssh -R 12345:localhost:8040 star.serveo.net
Forwarding TCP connections from serveo.net:12345

Test the port forwarding

I used the tutorial Loading CSV Data into StarRocks from Local Disk which is a HTTP put into the StarRocks database. #22783

atwong@Alberts-MBP Downloads % curl --location-trusted -uroot: -H "label:csvload2" \
    -H "column_separator:," \
    -H "columns: id, name, score" \
    -T example1.csv -XPUT \
    "TxnId": 6,
    "Label": "csvload2",
    "Status": "Success",
    "Message": "OK",
    "NumberTotalRows": 4,
    "NumberLoadedRows": 4,
    "NumberFilteredRows": 0,
    "NumberUnselectedRows": 0,
    "LoadBytes": 41,
    "LoadTimeMs": 382,
    "BeginTxnTimeMs": 6,
    "StreamLoadPlanTimeMs": 11,
    "ReadDataTimeMs": 0,
    "WriteDataTimeMs": 346,
    "CommitAndPublishTimeMs": 18