Skip to content

Instantly share code, notes, and snippets.

@kmanna
Created November 11, 2014 05:16
Show Gist options
  • Save kmanna/c4ae09394a7fe23c9429 to your computer and use it in GitHub Desktop.
Save kmanna/c4ae09394a7fe23c9429 to your computer and use it in GitHub Desktop.
Docker + Ansible + AOSP
---
- name: Configure a build machine to build AOSP
hosts: 127.0.0.1
connection: local
tasks:
- name: Install AOSP dependencies
action: apt pkg={{item}} state=present
with_items:
- bison
- bsdmainutils
- build-essential
- ccache
- curl
- file
- flex
- g++-multilib
- gcc-multilib
- git
- gnupg
- gperf
- lib32ncurses5-dev
- lib32readline-gplv2-dev
- lib32z1-dev
- libesd0-dev
- libncurses5-dev
- libsdl1.2-dev
- libwxgtk2.8-dev
- libxml2
- libxml2-utils
- lzop
- openjdk-6-jdk
- openjdk-6-jre
- pngcrush
- schedtool
- squashfs-tools
- xsltproc
- zip
- zlib1g-dev
- name: Install repo
get_url: url=https://commondatastorage.googleapis.com/git-repo-downloads/repo dest=/usr/local/bin/repo mode=0655
#FROM ubuntu:14.04
#RUN apt-get update && \
# apt-get install --no-install-recommends -y software-properties-common && \
# apt-add-repository ppa:ansible/ansible && \
# apt-get update && \
# apt-get install -y ansible
FROM ansible/ubuntu14.04-ansible:stable
MAINTAINER Kyle Manna <kmanna@fan.tv>
ADD aosp-build.yml /tmp/ansible/
RUN echo '[local]\nlocalhost' > /etc/ansible/hosts
RUN ansible-playbook -vv /tmp/ansible/aosp-build.yml -c local
RUN useradd --create-home aosp
VOLUME /tmp/ccache
VOLUME /aosp
ENV USE_CCACHE 1
ENV CCACHE /tmp/ccache
ENV HOME /home/aosp
USER aosp
@kmanna
Copy link
Author

kmanna commented Nov 11, 2014

Ansible adds little value here...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment