I check out the docker source 1.9.0, and try to build on AWS EC2. But failed, and error out.
/usr/local/go/pkg/tool/linux_amd64/6l: running gcc failed: Cannot allocate memory
I follow the Work with a development container. The EC2 is 1GB memory. How much memory is required for build docker v1.9.0?
[Update 2015-11-13]
The same EC2 can succeed to build 1.8.3, so there is no error in environment.
After I update the memory to 2GB, I succeed to build the 1.9.0.
More?
There's no current benchmarks on minimum requirements to compile docker. You are likely building it with a t2.micro or t2.small and the short answer is to bump that up to compile it temporarily.
Related
I'm running Docker on Windows 10 and got an error today that it's full. I just have 1 image (postgresql 10.1-alpine 38.2MB) and have removed everything else. I also ran docker system prune --force which freed up 0MB.
I've read that it is (or was) a known issue on Windows 10, that deleting containers leaves stuff behind. However, if I go into my %USERPROFILE%\.docker\machine\machines\default I find the VM disk file (disk.vmdk) that's 18GB in size!
Aside from uninstalling and reinstalling, is there any way to reduce the size of this file?
You can also prune the unused volumes, these consume a lot of space.
docker system prune --force --volumes
Are there any up-to-date guides, or VM images of some Linux VM + Kubernetes that I could run on Windows? Both VMWare, VirtualBox or Vagrant images would help. I'm trying to set up a development environment. (There is no production environment yet, but it will be most likely self-hosted.)
I tried installing several Vagrant templates for Kubernetes linked from their github documentation, but they were specifically marked as not supported on Windows; I tried compiling Kubernetes 0.15 from source under CoreOS and Boot2Docker, but ran into problems with either.
Since my ops skill set is relatively low, I'd sleep easier if I could use a template that was set up by someone who knew what they're doing.
If you install Docker on Windows (see the Docker instructions), you can then follow the guide to run Kubernetes locally via Docker and then once you are comfortable with that try running Multi-Node Kubernetes Using Docker.
One used to be able to download Vagrant boxes to debug Travis builds (for GitHub projects for instance). Apparently, this is no longer possible, so how do people currently debug complex Travis build chains locally?
One way to inspect the build (not to debug, sorry) is to send the build logs to another server on failure.
Here is an example:
after_failure
- sudo tar -czf /tmp/build-${TRAVIS_BUILD_NUMBER}-logs.tgz your-application-logs/
- scp /tmp/build-${TRAVIS_BUILD_NUMBER}-logs.tgz travis#your-server.com:~/logs
You could send them via email, store them on a storage server or whatever.
These logs would be useful to you if you run your tests in a debug mode and include our own logs as well in the tarball.
Unfortunately, there is no good solution for testing travis-ci builds locally at the moment. The closest thing I can recommend is a Ubuntu 12.04 vagrant vm and to provision it with the Travis chef cookbooks from here. This will solve most use cases as most of the time the test failures are not from the travis software (Though when it is you're in tough luck, as most Travis software depends on the other pieces of Travis software, making it fairly difficult to set up) but from the underling OS (Ubuntu) and software such as ruby and ruby gems.
I had a crack at making a docker file for JVM builds here which works well for me. It is based of the travis published containers and utilises the Travis CLI and Travis Build projects to be able to run your .travis.yml file within a docker container.
A built JVM image is on docker hub.
I'm a new user of Amazon EC2.
I want to compile the pptpd package on EC2, but receive the following error:
[root#ip-10-112-xxx-xxx /]# /var/tmp/rpm-tmp.2eILT0: line 58: /usr/bin/make: No such file or directory
I searched the entire root directory tree, but make isn't available:
[root#ip-10-112-59-187 /]# find . -name "make"
./etc/mail/make
I'm wondering whether make is actually installed on the Amazon Linux AMI initially? If not, how do I install it?
Preface
The Amazon Linux AMI is (loosely) based on CentOS and a perfectly decent OS for EC2, in fact it has been tailored by Amazon for EC2 specifically:
The Amazon Linux AMI is a supported and maintained Linux image
provided by Amazon Web Services for use on Amazon Elastic Compute
Cloud (Amazon EC2). It is designed to provide a stable, secure, and
high performance execution environment for applications running on
Amazon EC2. It also includes packages that enable easy integration
with AWS, [...]. Amazon Web Services provides ongoing security and
maintenance updates to all instances running the Amazon Linux AMI. [...] [emphasis mine]
However, it is indeed not as widely used yet as some other distributions, with the most popular likely being Ubuntu due to its popularity in general and its dedicated long time tailored support of EC2 in particular (see e.g. the EC2StartersGuide, the Ubuntu Cloud Images or the convenient listing of the Ubuntu AMIs for Amazon EC2 on alestic). This yields two drawbacks:
You'll find much more examples/tutorials/etc. for EC2 based on Ubuntu, making things easier eventually.
You'll find slightly less precompiled packages available for CentOS, requiring compiling your own eventually (but see below).
Solution
That said, CentOS (and the Amazon Linux AMI in turn) uses the Yum package manager to install and update packages from CentOS (and 3rd party) Repositories (Debian/Ubuntu use the APT package manager instead - the inherent concepts are very similar though), see e.g. section Adding Packages in Amazon Linux AMI Basics:
In addition to the packages included in the Amazon Linux AMI, Amazon
provides a yum repository consisting of common Linux applications for
use inside of Amazon EC2. The Amazon Linux AMI is configured to point
to this repository by default for all yum actions. The packages can be
installed by issuing yum commands. For example:
# sudo yum install httpd
Accordingly, you can install make via yum install make (you can get a listing of all readily available packages via yum list all).
Be advised though, that you might actually not need to do that, insofar the Amazon Linux AMI has been built to be binary-compatible with the CentOS series of releases, and therefore packages built to run on CentOS should also run on the Amazon Linux AMI. [emphasis mine]
The desired package pptpd is not part of the standard repositories on CentOS either though, but it is available in the 3rd party Extra Packages for Enterprise Linux (EPEL) repository (see Letter P) - I can't comment on the viability of using this one vs. compiling your own though.
Good luck!
Make is not installed by default on Amazon Linux AMIs. However, you can install it quite easily with yum. If you choose to only install make, you might get some errors later for other packages in the compilation process. If you are going to compile software, you might want to just install all of the development tools at once.
sudo yum groupinstall "Development Tools"
sudo yum groupinstall "Development Tools"
According to the documentation: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/compile-software.html
I am trying to install a python module on my VPS and am running into the following problem once I try to run the install:
virtual memory exhausted: Cannot allocate memory
error: command 'gcc' failed with exit status 1
I tried a few things that I read online to try to solve this but have yet to have any luck. I spoke with a friend at work, and he said that a common way to get around this on a VPS was to alias GCC with mySQLd since VPSs will typically allow more virtual memory for mySQL.
So, my question is: how does one alias GCC with mySQLd and then switch it back?
For reference, I am running CentOS.
I recently had the same issue while compiling PHP5 on a virtual server. The way I finally solved it was to add more swap space by creating a swap file; see http://www.redhat.com/docs/manuals/linux/RHL-8.0-Manual/custom-guide/s1-swap-adding.html for instructions. You may also need to raise vm.max_map_count by running /sbin/sysctl -w vm.max_map_count=[ENOUGH], where [ENOUGH] is a magic number for which I do not have a good recommendation. However, you can check it first (/sbin/sysctl vm.max_map_count) and base your guess on that.
And please congratulate your co-worker on his creativity! :)