I followed this railscast to deploy my Rails application: http://railscasts.com/episodes/347-rubber-and-amazon-ec2?view=asciicast
Something is wrong for me, because after running the command: cap rubber: create_staging and follow all the instructions according to the tutorial, my console display the following error after creating the instance:
** Instance mycustomdomain.com created: i-a53333x1
Waiting for instances to start.......................................................................
** Instance running, fetching hostname/ip data
Trying to enable root login
* 2013-09-28 00:38:48 executing `rubber:_ensure_key_file_present'
* 2013-09-28 00:38:48 executing `rubber:_allow_root_ssh'
* executing "sudo -p 'sudo password: ' bash -l -c 'mkdir -p /root/.ssh && cp /home/ubuntu/.ssh/authorized_keys /root/.ssh/'"
servers: ["xx.xxx.xx.159"]
Any ideas or recommendations?
I'm using Mac OS X Mountain Lion.
Thank you.
Related
I have a linux server, with no connectivity to github (it's blocked in our office), and need to run standalone-chrome-debug docker image.
So in my side, i clone the repo and transfer it to the linux machine, but when i run the docker command:
docker run -d -p 4444:4444 -p 0:5900 -v /dev/shm:/dev/shm -e VNC_NO_PASSWORD=1 selenium/standalone-chrome-debug
i got a lot of error, such as entry_point.sh not found, and different similar issues of missing files, so my question is:
how can i make this docker run successfully , if i have the repository locally, and have no access to github, can you assist me with this issue ?
When running postgresql alpine image with podman :
podman run --name postgres -p 5432:5432 -e POSTGRES_PASSWORD=test -e POSTGRES_USER=test -d postgres:11-alpine
the result is :
Error: /usr/bin/slirp4netns failed: "open(\"/dev/net/tun\"): No such device\nWARNING: Support for sandboxing is experimental\nchild failed(1)\nWARNING: Support for sandboxing is experimental\n"
The running system is archlinux. Is there a way to fix this error or a turn arround ?
Thanks
Is slirp4netns correctly installed? Check the project Site for information.
Sometimes the flag order matters. try -d first and -p last (directly infornt of the image) looking like:
podman run -d --name postgres -e POSTGRES_PASSWORD=test -e POSTGRES_USER=test -p 5432:5432 postgres:11-alpine
Try only creating the neccessary password, then log into your container and create manually (this always worked for me)
podman run -d --name postgres -e POSTGRES_PASSWORD=test -p 5432:5432 postgres:11-alpline
podman exec -it postgres bash
Create default user postgres
su - postgres
start postgres
psql
create databases and tables
CREATE USER testuser WITH PASSWORD 'testpassword' | Doku
CREATE DATABASE testdata WITH OWNER testuser
Check if it worked
\l+
Connect to your Database via IP and Port
I assume you upgraded Arch packages recently. Most likely your system needs a restart.
I am doing a on prem setup of openwhisk using local couchdb installation on ubuntu 16.04 for which I downloaded the code from the github. I have followed all the steps of the setup, after the build, I have to run various playbooks
when is run the below playbook with the below command
ansible-playbook -i environments/local openwhisk.yml
I get error
"error": "The server is currently unavailable (because it is overloaded or down for maintenance).",
"code": 4
when I check I found it is coming while executing installRouteMgmt.sh from /openwhisk/ansible/roles/routemgmt/files
the line in the script which is throwing error is
enter code here`echo Installing routemgmt package.
$WSK_CLI -i -v --apihost "$APIHOST" package update --auth "$AUTH" --shared no "$NAMESPACE/routemgmt" \
-a description "This experimental package manages the gateway API configuration." \
-p gwUser "$GW_USER" \
-p gwPwd "$GW_PWD" \
-p gwUrl "$GW_HOST" \
-p gwUrlV2 "$GW_HOST_V2"
where
APIHOST=172.17.0.1
AUTH=path to auth.whisk.system
WSK_CLI= wsk path
NAMESPACE= whisk.system
This error comes when the DB host value is not resolvable from the controller container or when the DB which the controller trying to connect to is not created in the couch DB. Mine was the second case once __subjects db was there,
it was able to run
I am experimenting with Docker and am very new to it. I am struck at a point for a long time and am not getting a way through and hence came up with this question here...
Problem Statement:
I am trying to create an image from a docker file containing Apache and lynx installation. Once done I am trying to access tomcat on 8080 of the container which is in turn forwarded to the 8082 of the host. But when running the image I never get tomcat started in the container.
The Docker file
FROM ubuntu:16.10
#Install Lynx
Run apt-get update
Run apt-get install -y lynx
#Install Curl
Run apt-get install -y curl
#Install tools: jdk
Run apt-get update
Run apt-get install -y openjdk-8-jdk wget
#Install apache tomcat
Run groupadd tomcat
Run useradd -s /bin/false -g tomcat -d /opt/tomcat tomcat
Run cd /tmp
Run curl -O http://apache.mirrors.ionfish.org/tomcat/tomcat- 8/v8.5.12/bin/apache-tomcat-8.5.12.tar.gz
Run mkdir /opt/tomcat
Run tar xzvf apache-tomcat-8*tar.gz -C /opt/tomcat --strip-components=1
Run cd /opt/tomcat
Run chgrp -R tomcat /opt/tomcat
Run chmod -R g+r /opt/tomcat/conf
Run chmod g+x /opt/tomcat/conf
Run chown -R tomcat /opt/tomcat/webapps /opt/tomcat/work /opt/tomcat/temp opt/tomcat/logs
Run cd /opt/tomcat/bin
Expose 8080
CMD /opt/tomcat/bin/catalina.sh run && tail -f /opt/tomcat/logs/catalina.out
When the image is built I tried running the container by the two below methods
docker run -d -p 8082:8080 imageid tail -f /dev/null
While using the above, container is running but tomcat is not started inside the container and hence not accessible from localhost:8082. Also I do not see anything if I perform docker logs longcontainerid
docker run -d -p 8082:8080 imageid /path/to/catalina.sh start tail -f /dev/null
I see tomcat started when I do docker logs longconatainrid
While using the above the container is started and stopped immediately and is not running as I can see from docker ps and hence again not accessible from localhost:8082.
Can anyone please tell me where I am going wrong?
P.s. I searched a lot on the internet but could not get the thing right. Might be there is some concept that i am not getting clearly.
Looking at the docker run command documentation, the doc states that any command passed to the run will override the original CMD in your Dockerfile:
As the operator (the person running a container from the image), you can override that CMD instruction just by specifying a new COMMAND
1/ Then when you run:
docker run -d -p 8082:8080 imageid tail -f /dev/null
The container is run with COMMAND tail -f /dev/null, the original command starting tomcat is overridden.
To resolve your problem, try to run:
docker run -d -p 8082:8080 imageid
and
docker log -f containerId
To see if tomcat is correctly started.
2/ You should not use the start argument with catalina.sh. Have a look at this official tomcat Dokerfile, the team uses :
CMD ["catalina.sh", "run"]
to start tomcat (when you use start, docker ends container at the end of the shell script and tomcat will start but not maintain a running process).
3/ Finally, why don't you use tomcat official image to build your container? You could just use the :
FROM tomcat:latest
directive at the beginning of your Dockerfile, and add you required elements (new files, webapps war, settings) to the docker image.
Goal: To have "cap staging deploy" work again.
Problem: The development server's IP was changed.
Background:
I develop on my personal PC/Ubuntu 10.04 LTS and push updates to the development/test server which is Ubuntu 10.04 LTS-Virtual Machine. I am using Rails 3 & Ruby 1.9.2.
I have the git repository on the development server and I use SSH keys instead of passwords when I push updates or run: cap staging deploy.
I can successfully do: git push web_forms2_git_repo develop
When I run: cap staging deploy ... I get these results:
* executing `staging'
triggering start callbacks for `deploy'
* executing `multistage:ensure'
* executing `deploy'
* executing `deploy:update'
** transaction: start
* executing `deploy:update_code'
executing locally: "git ls-remote ssh://git#my-domain-name/home/git/web_forms2.git develop"
command finished in 3381ms
* executing "git clone -q ssh://git#my-domain-name/home/git/web_forms2.git /home/rails_192/apps/cals_web_forms/public/releases/20111220174923 && cd /home/rails_192/apps/cals_web_forms/public/releases/20111220174923 && git checkout -q -b deploy 5c2910f687480f136206e56ba73c268c7026df20 && (echo 5c2910f687480f136206e56ba73c268c7026df20 > /home/rails_192/apps/cals_web_forms/public/releases/20111220174923/REVISION)"
servers: ["my-domain-name"]
[my-domain-name] executing command
** [my-domain-name :: out] ssh: connect to host my-domain-name port 22: No route to host
** fatal: The remote end hung up unexpectedly
command finished in 3271ms
*** [deploy:update_code] rolling back
* executing "rm -rf /home/rails_192/apps/cals_web_forms/public/releases/20111220174923; true"
servers: ["my-domain-name"]
[my-domain-name] executing command
command finished in 39ms
failed: "env PATH=/home/...
I did try to clone web_forms2 repository to my local PC but it didn't work and I will paste the results below:
Command: git clone ssh://git#my-domain-name/home/git/web_forms2.git
Results: fatal: could not create work tree dir 'web_forms2'.: Permission denied
Has anyone come across this before?
Thanks
You can set the IP of the server in your Capistrano config file (config/deploy.rb):
role :web, "71.19.150.118" # replace this IP with the new IP or server address.
Keep in mind that if you use host names instead of IPs, #Sergei Tulentsev is right and you'll have to update your /etc/hosts file to reflect the change in the IP.