Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
a30fc5d1
Commit
a30fc5d1
authored
9 years ago
by
Jan Tattermusch
Browse files
Options
Downloads
Patches
Plain Diff
add scripts for creating performance worker VMs
parent
bceec94e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tools/gce/create_linux_performance_worker.sh
+61
-0
61 additions, 0 deletions
tools/gce/create_linux_performance_worker.sh
tools/gce/linux_performance_worker_init.sh
+106
-0
106 additions, 0 deletions
tools/gce/linux_performance_worker_init.sh
with
167 additions
and
0 deletions
tools/gce/create_linux_performance_worker.sh
0 → 100755
+
61
−
0
View file @
a30fc5d1
#!/bin/bash
# Copyright 2015-2016, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
# * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Creates a performance worker on GCE.
set
-ex
cd
$(
dirname
$0
)
CLOUD_PROJECT
=
grpc-testing
ZONE
=
us-central1-b
# this zone allows 32core machines
INSTANCE_NAME
=
"
${
1
:-
grpc
-performance-driver
}
"
MACHINE_TYPE
=
n1-standard-32
gcloud compute instances create
$INSTANCE_NAME
\
--project
=
"
$CLOUD_PROJECT
"
\
--zone
"
$ZONE
"
\
--machine-type
$MACHINE_TYPE
\
--image
ubuntu-15-10
\
--boot-disk-size
300
echo
'Created GCE instance, waiting 60 seconds for it to come online.'
sleep
60
gcloud compute copy-files
\
--project
=
"
$CLOUD_PROJECT
"
\
--zone
"
$ZONE
"
\
jenkins_master.pub linux_performance_worker_init.sh
${
INSTANCE_NAME
}
:~
gcloud compute ssh
\
--project
=
"
$CLOUD_PROJECT
"
\
--zone
"
$ZONE
"
\
$INSTANCE_NAME
--command
"./linux_performance_worker_init.sh"
This diff is collapsed.
Click to expand it.
tools/gce/linux_performance_worker_init.sh
0 → 100755
+
106
−
0
View file @
a30fc5d1
#!/bin/bash
# Copyright 2015-2016, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
# * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Initializes a fresh GCE VM to become a jenkins linux performance worker.
# You shouldn't run this script on your own,
# use create_linux_performance_worker.sh instead.
set
-ex
sudo
apt-get update
# Install JRE
sudo
apt-get
install
-y
openjdk-7-jre
sudo
apt-get
install
-y
unzip lsof
# Setup jenkins user (or the user will already exist bcuz magic)
sudo
adduser jenkins
--disabled-password
||
true
# Add pubkey of jenkins@grpc-jenkins-master to authorized keys of jenkins@
# This needs to happen as the last step to prevent Jenkins master from connecting
# to a machine that hasn't been properly setup yet.
cat
jenkins_master.pub |
sudo tee
--append
~jenkins/.ssh/authorized_keys
sudo
apt-get
install
-y
\
autoconf
\
autotools-dev
\
build-essential
\
bzip2
\
ccache
\
curl
\
gcc
\
gcc-multilib
\
git
\
gyp
\
lcov
\
libc6
\
libc6-dbg
\
libc6-dev
\
libgtest-dev
\
libtool
\
make
\
strace
\
pypy
\
python-dev
\
python-pip
\
python-setuptools
\
python-yaml
\
telnet
\
unzip
\
wget
\
zip
# perftools
sudo
apt-get
install
-y
google-perftools libgoogle-perftools-dev
# C++ dependencies
sudo
apt-get
install
-y
libgflags-dev libgtest-dev libc++-dev clang
# Python dependencies
sudo
pip
install
tabulate
curl
-O
https://bootstrap.pypa.io/get-pip.py
sudo
pypy get-pip.py
sudo
pypy
-m
pip
install
tabulate
# Node dependences.
touch
.profile
curl
-o-
https://raw.githubusercontent.com/creationix/nvm/v0.25.4/install.sh | bash
nvm
install
0.12
&&
npm config
set
cache /tmp/npm-cache
# C# dependencies (http://www.mono-project.com/docs/getting-started/install/linux/#debian-ubuntu-and-derivatives)
sudo
apt-key adv
--keyserver
hkp://keyserver.ubuntu.com:80
--recv-keys
3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo
"deb http://download.mono-project.com/repo/debian wheezy main"
|
sudo tee
/etc/apt/sources.list.d/mono-xamarin.list
sudo
apt-get update
sudo
apt-get
install
-y
mono-devel nuget
# Ruby dependencies
gpg
--keyserver
hkp://keys.gnupg.net
--recv-keys
409B6B1796C275462A1703113804BB82D39DC0E3
curl
-sSL
https://get.rvm.io | bash
-s
stable
--ruby
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment