天道酬勤,学无止境

digital-ocean

Elasticsearch clustering behind UFW firewall

I have an Elasticsearch cluster running on two different Digital Ocean droplets. They are both set up for private networking, an I have a Mongo DB replica set running just fine with UFW rules set up to only accept connections on the relevant ports from the droplets' specific (private) IP addresses. However I am not able to get a green Elasticsearch cluster health using the same method, only yellow. This means that the nodes are not able to connect to each other. In elasaticsearch.yml (on both machines) I have disabled multicast and am using unicast to connect to the droplet's internal IP

2021-06-15 13:49:28    分类:问答    elasticsearch   firewall   ubuntu-14.04   digital-ocean

Running Node as a service with PM2 - connection refused

I am following this tutorial for setting up a node project on a Digital Ocean Ubuntu distribution. systemctl status pm2 shows the service is online: App name │ id │ mode │ pid │ status │ restart │ uptime │ memory │ watching server │ 1 │ fork │ 19999 │ online │ 0 │ 0s │ 21.219 MB │ disabled │ However I get a connection refused error when I attempt to navigate to the domain. The application starts fine on port 5000 if I run it with npm start. I have Nginx installed and configured as follows: server { listen 80; server_name <mysite.com>; location / { proxy_pass http://localhost:5000; proxy_http

2021-06-15 05:34:30    分类:问答    node.js   ubuntu   nginx   digital-ocean   pm2

Nginx with Let's encrypt “Welcome to Nginx” instead of rails app

I have recently deployed my Ruby on Rails application to a plain Ubuntu 16.04 DigitalOcean droplet with Nginx, passenger & Let's encrypt. The rails app worked fine with just passenger and Nginx but after I installed Let's Encrypt, it points to the "Welcome to Nginx" page instead of my rails app. I am able to make changes to see the "Welcome to Nginx!" page and see the results in the browser. When I change the root location in my sites-enabled configs to my application path instead of /html I get a 403 Forbidden error. This is where my application is: /var/www/myapp/code/ I don't know what

2021-06-14 08:40:50    分类:问答    ubuntu   nginx   passenger   digital-ocean   lets-encrypt

Python - Node.js (V8) runtime is not available on this system

I'm getting the following error when trying to use ExecJS: execjs.RuntimeUnavailable: Node.js (V8) runtime is not available on this system I have node.js installed on my machine (Ubuntu 14.04). Which Node outputs /usr/bin/node Any ideas?

2021-06-14 04:43:09    分类:问答    python   node.js   ubuntu   ubuntu-14.04   digital-ocean

如何使用 Digital Ocean DNS 和 Nginx 设置全局负载均衡?(How do I set up global load balancing using Digital Ocean DNS and Nginx?)

问题 更新:请参阅我在下面提供的答案,了解我最终在 AWS 上设置的解决方案。 我目前正在试验为我在 Digital Ocean 上的应用程序服务器实现全局负载平衡层的方法,我还没有把一些部分放在一起。 目标 通过将所有连接路由到最近的 SFO、NYC、LON 和最终新加坡服务器“集群”,为我的用户提供高度可用的服务。 此外,我最终希望通过编写一个可以监控、扩展和修复系统上任何服务器的守护进程来自动维护这个。 或者我将结合各种服务来实现相同的自动化目标。 首先,我需要弄清楚如何手动完成。 堆栈 Ubuntu 14.04 nginx 1.4.6 节点.js 来自 Compose.io(原 MongoHQ)的 MongoDB 全球域名细分 一旦我把所有东西都装好,我的域看起来像这样: **GLOBAL** global-balancing-1.myapp.com global-balancing-2.myapp.com global-balancing-3.myapp.com **NYC** nyc-load-balancing-1.myapp.com nyc-load-balancing-2.myapp.com nyc-load-balancing-3.myapp.com nyc-app-1.myapp.com nyc-app-2.myapp.com nyc-app-3.myapp

2021-06-12 11:12:50    分类:技术分享    nginx   dns   global   load-balancing   digital-ocean

Ubuntu / DigitalOcean - Unable to fetch packages to install git on a fresh install

Just started with a fresh install of Ubuntu 14.04 on my digitalocean droplet and I'm trying to install git. My first attempt failed to install some packages - root@Jedi:~# sudo apt-get install git-all ... ... E: Failed to fetch http://mirrors.digitalocean.com/ubuntu/pool/main/g/gcc-4.8/libgomp1_4.8.4-2ubuntu1~14.04.1_amd64.deb 404 Not Found [IP: 95.85.0.50 80] E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? So I took the suggestion above and re-ran it with --fix-missing hoping that would fix it. No luck - still missing the package mentioned below. What

2021-06-10 11:01:17    分类:问答    git   ubuntu   digital-ocean   apt-get

How to set up tomcat context path for web application? .war file name is coming infront of the application name in the url

I am having a trouble getting my web application 'xyz' running in tomcat 7 server hosted in DigitalOcean servers at: http://myDomain:8080/myWebApp The name of my .war file is ".MyWebApp". after deploying the .war file in tomcat, the application starts at: http://myDomain:8080/MyWebApp/myWebApp any idea how to remove this "MyWebApp" part from the URL? I have seen some of the solutions for this problem, they are mostly solutions of running the application in localhost. They suggested to change the 'context.xml' file which I already did like this: <?xml version='1.0' encoding='utf-8'?> <Context>

2021-06-09 20:01:47    分类:问答    java   tomcat   digital-ocean

Terraform: Mount volume

According to documentation, using terraform, I'm able to create a droplet on digital ocean: resource "digitalocean_volume" "foobar" { region = "nyc1" name = "baz" size = 100 description = "an example volume" } So, I'm also able to add a volume to it: resource "digitalocean_droplet" "foobar" { name = "baz" size = "1gb" image = "coreos-stable" region = "nyc1" volume_ids = ["${digitalocean_volume.foobar.id}"] } I'd like to know how to mount this on a desired location. I need to mount it automatically. I mean, when droplet is up I need to the volume is mounted. I was thinking about using chef

2021-06-09 11:09:36    分类:问答    digital-ocean   terraform

Setting up a vagrant with a digitalocean image

I dont know if this should be posted here or on another stack community so please let me know if its wrong posting it here. How do I get a local (i.e. on my laptop) VM that is identical to my DO droplet (Ubuntu 14.04 - LAMP etc) running? Does DO provide a provisioner for Vagrant that can replicate the setup of a DO droplet? It's handy being able to develop on my machine, instead of on a Droplet in the cloud.

2021-06-04 18:22:39    分类:问答    vagrant   digital-ocean

Kubernetes simple authentication

I am using KUbernetes on a coreOs cluster hosted on DigitalOcean. And using this repo to set it up. I start the apiserver with the following line: /opt/bin/kube-apiserver --runtime-config=api/v1 --allow-privileged=true \ --insecure-bind-address=0.0.0.0 --insecure-port=8080 \ --secure-port=6443 --etcd-servers=http://127.0.0.1:2379 \ --logtostderr=true --advertise-address=${COREOS_PRIVATE_IPV4} \ --service-cluster-ip-range=10.100.0.0/16 --bind-address=0.0.0.0 The problem is that it accepts request from anyone! I want to be able to provide a simple user/password authentication. I have been

2021-06-03 11:14:56    分类:问答    kubernetes   digital-ocean   coreos