-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setup: add cross compiling machine #244
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Node.js Build Cross Compiler Setup | ||
|
||
For setting up a Ubuntu 14.04 box as a cross compiler. Current setup includes Raspberry Pi. | ||
|
||
```text | ||
Host node-msft-cross-compiler-1.cloudapp.net | ||
HostName node-msft-cross-compiler-1.cloudapp.net | ||
User root | ||
``` | ||
|
||
Note that these hostnames are also used in the *ansible-inventory* file. The IP addresses will need to be updated each time the servers are reprovisioned. | ||
|
||
To set up a host, run: | ||
|
||
```text | ||
$ ansible-playbook -i ../ansible-inventory ansible-playbook.yaml | ||
``` | ||
|
||
**Users**: The ansible-vars.yaml file contains a list of users who's GitHub public keys are pulled and placed into authorized_keys for both root and iojs users. This file should be updates when new users are added to the build project who are able to help maintain the containerized builds. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
--- | ||
- hosts: nodejs-cross-compiler | ||
|
||
remote_user: azureuser | ||
sudo: yes | ||
|
||
tasks: | ||
|
||
- include_vars: ansible-vars.yaml | ||
tags: vars | ||
|
||
- name: General | Install updated git PPA | ||
apt_repository: repo='ppa:git-core/ppa' | ||
tags: general | ||
|
||
- name: General | APT Update | ||
apt: update_cache=yes | ||
tags: general | ||
|
||
- name: General | APT Upgrade | ||
apt: upgrade=full | ||
tags: general | ||
|
||
- name: General | Install required packages | ||
apt: name={{ item }} update_cache=yes state=latest | ||
with_items: packages | ||
tags: general | ||
|
||
- name: General | Increase file descriptor limits | ||
lineinfile: dest=/etc/security/limits.conf line="{{ item }}" | ||
with_items: | ||
- "* hard nofile 500000" | ||
- "* soft nofile 500000" | ||
- "root hard nofile 500000" | ||
- "root soft nofile 500000" | ||
tags: general | ||
|
||
- include: ../ansible-tasks/ccache.yaml version=3.2.3 | ||
tags: ccache | ||
|
||
- name: User | Add {{ server_user }} user | ||
user: name="{{ server_user }}" shell=/bin/bash | ||
tags: user | ||
|
||
- name: Raspberry | Clone raspberry tools repository | ||
git: repo=https://github.com/raspberrypi/tools.git dest=/opt/raspberrypi/tools | ||
tags: raspberry | ||
|
||
- name: Raspberry | Copy cc-armv6.sh script | ||
copy: src=./resources/cc-armv6.sh dest=/opt/raspberrypi/cc-armv6.sh mode=0755 | ||
tags: raspberry | ||
|
||
- name: Raspberry | Copy cc-armv7.sh script | ||
copy: src=./resources/cc-armv7.sh dest=/opt/raspberrypi/cc-armv7.sh mode=0755 | ||
tags: raspberry | ||
|
||
- name: User | Download pubkey(s) | ||
get_url: url=https://github.com/{{ item }}.keys dest=/tmp/{{ item }}.keys | ||
This comment was marked as off-topic.
Sorry, something went wrong. |
||
delegate_to: 127.0.0.1 | ||
become: no | ||
with_items: ssh_users | ||
tags: user | ||
|
||
- name: General | Create authorized_keys for root | ||
authorized_key: user="root" key="{{ lookup('file', '/tmp/' + item + '.keys') }}" | ||
with_items: ssh_users | ||
This comment was marked as off-topic.
Sorry, something went wrong. |
||
tags: user | ||
|
||
- name: General | Create authorized_keys for azureuser | ||
authorized_key: user="azureuser" key="{{ lookup('file', '/tmp/' + item + '.keys') }}" | ||
with_items: ssh_users | ||
tags: user | ||
|
||
- name: General | Create authorized_keys for {{ server_user }} | ||
authorized_key: user="{{ server_user }}" key="{{ lookup('file', '/tmp/' + item + '.keys') }}" | ||
with_items: ssh_users | ||
tags: user | ||
|
||
- name: User | Download Jenkins pubkey | ||
get_url: url=https://gist.githubusercontent.com/nodejs-ci/cea606894437b45e99d0/raw/ci-iojs-org-id_rsa-slaves.pub dest=/tmp/nodejs-ci.keys | ||
delegate_to: 127.0.0.1 | ||
become: no | ||
tags: user | ||
|
||
- name: General | Add Jenkins to authorized_keys for {{ server_user }} | ||
authorized_key: user="{{ server_user }}" key="{{ lookup('file', '/tmp/nodejs-ci.keys') }}" | ||
tags: user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
server_user: iojs | ||
ssh_users: | ||
- rvagg | ||
- jbergstroem | ||
- joaocgreis | ||
- orangemocha | ||
packages: | ||
- openjdk-7-jre | ||
- git | ||
- build-essential | ||
- gcc-multilib | ||
- g++-multilib | ||
- python-all | ||
- python-software-properties | ||
- automake | ||
- libtool | ||
- curl | ||
- monit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
iojs-build-* | ||
nodejs-* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export CC_host='ccache gcc -m32' | ||
export CXX_host='ccache g++ -m32' | ||
export CC="ccache /opt/raspberrypi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-gcc -march=armv6zk" | ||
export CXX="ccache /opt/raspberrypi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++ -march=armv6zk" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export CC_host='ccache gcc -m32' | ||
export CXX_host='ccache g++ -m32' | ||
export CC="ccache /opt/raspberrypi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-gcc -march=armv7-a" | ||
export CXX="ccache /opt/raspberrypi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++ -march=armv7-a" |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This comment was marked as off-topic.
Sorry, something went wrong.