This file contains hidden or 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
#!/usr/bin/env bash | |
region=$(curl http://169.254.169.254/latest/meta-data/placement/region | sed 's/-1$//') | |
sed -i "s/<DATACENTER>/${region}/g" /opt/scylla_setup/setup.cql | |
ip=$(curl http://169.254.169.254/latest/meta-data/local-ipv4) | |
export CQLSH_HOST=$ip | |
max_attempts=30 | |
retry_interval=10 | |
echo "Waiting for $ip to become available..." |
This file contains hidden or 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
#!/usr/bin/env bash | |
SEED_IP=$1 | |
ip=$(curl http://169.254.169.254/latest/meta-data/local-ipv4) | |
sed -i "s/seeds: localhost/seeds: \"${SEED_IP}\"/g" /etc/scylla/scylla.yaml | |
sed -i "s/listen_address: localhost/listen_address: \"${ip}\"/g" /etc/scylla/scylla.yaml | |
sed -i "s/rpc_address: localhost/rpc_address: \"${ip}\"/g" /etc/scylla/scylla.yaml | |
nic=$(ip link show | grep -o 'ens[0-9]*') |
This file contains hidden or 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
#!/usr/bin/env bash | |
ip=$(curl http://169.254.169.254/latest/meta-data/local-ipv4) | |
sed -i "s/seeds: localhost/seeds: \"${ip}\"/g" /etc/scylla/scylla.yaml | |
sed -i "s/listen_address: localhost/listen_address: \"${ip}\"/g" /etc/scylla/scylla.yaml | |
sed -i "s/rpc_address: localhost/rpc_address: \"${ip}\"/g" /etc/scylla/scylla.yaml | |
nic=$(ip link show | grep -o 'ens[0-9]*') | |
disk=$(lsblk -bno NAME,SIZE | sort -k2n | tail -n1 | awk '{print $1}') | |
scylla_setup --disks "/dev/${disk}" --online-discard 1 --nic "${nic}" --no-kernel-check --no-enable-service --no-ntp-setup --no-coredump-setup --io-setup 1 --no-version-check --no-rsyslog-setup --no-verify-package --no-cpuscaling-setup |
This file contains hidden or 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
cluster_name: ClusterName | |
num_tokens: 256 | |
data_file_directories: | |
- /var/lib/scylla/data | |
commitlog_directory: /var/lib/scylla/commitlog | |
seed_provider: | |
- class_name: org.apache.cassandra.locator.SimpleSeedProvider | |
parameters: | |
- seeds: localhost | |
listen_address: localhost |
This file contains hidden or 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
--- | |
- name: Add repo | |
become: yes | |
shell: "{{ item }}" | |
with_items: | |
- "gpg --homedir /tmp --no-default-keyring --keyring /etc/apt/keyrings/scylladb.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys d0a112e067426ab2" | |
- "wget -O /etc/apt/sources.list.d/scylla.list http://downloads.scylladb.com/deb/debian/scylla-5.2.list" | |
- name: Install ScyllaDB | |
become: yes |
This file contains hidden or 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
public class BoardCreator : MonoBehaviour | |
{ | |
... | |
private void SetupRowLayout() | |
{ | |
... | |
var hexPosition = hexes[new Vector2Int(5, 5)].transform.position; | |
Camera.main.transform.position = new Vector3(hexPosition.x, Camera.main.transform.position.y, hexPosition.z); | |
} |
This file contains hidden or 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
public class BoardCreator : MonoBehaviour | |
{ | |
... | |
// make positive to achieve opposite layout | |
private const float Offset = -0.5f; | |
private const float HexDistance = 1.2f; | |
... |
This file contains hidden or 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
public class BoardCreator : MonoBehaviour | |
{ | |
public GameObject Hex; | |
// make positive to achieve opposite layout | |
private const float Offset = -0.5f; | |
private const float HexDistance = 1.2f; | |
private void Start() | |
{ |
This file contains hidden or 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
#!groovy | |
import groovy.transform.Field | |
@Field | |
def s3BucketFolder | |
pipeline { | |
agent { label 'agent' } |
This file contains hidden or 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
--- | |
AWSTemplateFormatVersion: '2010-09-09' | |
Description: 'Jenkins Role' | |
Resources: | |
JenkinsRole: | |
Type: AWS::IAM::Role | |
Properties: | |
Description: "Used for serverspec tests" | |
RoleName: instance-serverspec |