Skip to content

Instantly share code, notes, and snippets.

root@e7605ba47d5c:/opt/code/github/threefoldtech# zrobot server start -D ssh://git@docs.grid.tf:7022/abdelmab/pola-data.git -C ssh://git@docs.grid.tf:7022/abdelmab/pola-config.git -T git@github.com:threefoldtech/0-templates.git#development --debug --auto-push-interval 1 -L 6601
[Sun16 09:17] - GitFactory.py :316 :j.clients.git - INFO - None:pull:ssh://git@docs.grid.tf:7022/abdelmab/pola-data.git ->/opt/code/docs/abdelmab/pola-data
[Sun16 09:17] - GitFactory.py :399 :j.clients.git - INFO - git clone ssh://git@docs.grid.tf:7022/abdelmab/pola-data.git -> /opt/code/docs/abdelmab/pola-data
[Sun16 09:17] - GitFactory.py :419 :j.clients.git - INFO - mkdir -p /opt/code/docs/abdelmab;cd /opt/code/docs/abdelmab;git -c http.sslVerify=false clone ssh://git@docs.grid.tf:7022/abdelmab/pola-data.git /opt/code/docs/abdelmab/pola-data
[Sun16 09:17] - GitFactory.py :316 :j.clients.git - INFO - None:pull:ssh://git@docs.grid.tf:7022/abdelmab/pola-config.git ->/opt/
root@e7605ba47d5c:~# python3 s3.py --robot zero-boot --s3_instances 1 --zt_token fcUzNwpSvdffddf --zt_nw_id 35c192ce9b7015e9 --farmer_name operation --storage_type ssd --storage_size 2 --minio_login test --minio_password test12345
[Sun16 10:40] - s3.py :22 :j.s3_deployment - INFO - [*] zerotier client : acd9c7c0ba
[Sun16 10:40] - s3.py :53 :j.s3_deployment - INFO - [*] s3 service name : fb763493eb
Process Process-2:
Traceback (most recent call last):
File "/usr/lib/python3.5/multiprocessing/process.py", line 249, in _bootstrap
self.run()
File "/usr/lib/python3.5/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "s3.py", line 55, in install_s3
@Pishoy
Pishoy / disk-failure s3_red
Created November 27, 2018 17:15
disk-failure s3_red
In [92]: print (active.logs)
2018-11-27 15:53:52,293 - /opt/code/github/threefoldtech/0-templates/templates/s3/s3.py:274 - INFO - wait for all namespaces and vm to be installed
2018-11-27 15:53:52,293 - /opt/code/github/threefoldtech/0-templates/templates/s3/s3.py:434 - INFO - create namespaces to be used as a backend for minio
2018-11-27 15:53:52,294 - /opt/code/github/threefoldtech/0-templates/templates/s3/s3.py:436 - INFO - compute how much zerodb are required
2018-11-27 15:53:52,294 - /opt/code/github/threefoldtech/0-templates/templates/s3/s3.py:449 - INFO - namespaces required: 8 of 50GB
2018-11-27 15:53:52,294 - /opt/code/github/threefoldtech/0-templates/templates/s3/s3.py:450 - INFO - namespaces already deployed 0
2018-11-27 15:53:52,301 - /opt/code/github/threefoldtech/0-templates/templates/s3/s3.py:496 - INFO - create namespaces to be used as a tlog for minio
2018-11-27 15:53:52,305 - /opt/code/github/threefoldtech/0-templates/templates/s3/s3.py:530 - INFO - create the zero-os vm on which we will cre
args = {
'nics': [{'name': 'ten', 'type': 'zerotier', 'ztClient':'main', 'id': 'a0cbf4b62acb21c7'}],
'farmerIyoOrg': 'kristof-farm',
'nrEtcds': 1,
'publicNodes': ['ac1f6b4571cc'],
'publicIps': ['122.2.1.3']
}
wg = robot.services.create('github.com/threefoldtech/0-templates/web_gateway/0.0.1', 'wg', data=args)
wg.schedule_action('install').wait(die=True)
args = {
In [4]: s3_redundant = robot.services.get(name='mys3_red2')
In [5]: s3_redundant.data
Out[5]:
{'data': {'activeS3': '806a53f0-a289-410f-a104-b6f9d9001300',
'dataShards': 1,
'farmerIyoOrg': 'bancadati.threefold.grid.farm01',
'mgmtNic': {'id': 'a0cbf4b62acb21c7', 'ztClient': 'main'},
'minioBlockSize': 1048576,
'minioLogin': 'login',
In [63]: s3.data
Out[63]:
{'data': {'activeS3': '6e597624-34f3-402b-bf2c-a5f4affae3d3',
'dataShards': 1,
'farmerIyoOrg': 'bancadati.threefold.grid.farm01',
'mgmtNic': {'id': '159924d63085650f', 'ztClient': 'client'},
'minioBlockSize': 1048576,
'minioLogin': 'login',
'minioPassword': 'password',
'nsPassword': 'e46asjwauxrlyqyf1zekommrjcgdu0rr',
[startup.sshdkeys]
name = "bash"
after = ["init"]
running_delay = -1
[startup.sshdkeys.args]
script = """
chmod 400 -R /etc/ssh/
mkdir -p /run/sshd
"""
JSX> c = j.clients.tfchain.new(name='my_client', network_type='TEST')
JSX> w = c.wallets.new("my_wallet2")
JSX> w.see
JSX> w.seed
'lift sheriff ocean apology word direct turkey hood section shrimp when easy law fall school excite hurry carpet found quick leisure lumber soft lift'
JSX> w.address
'011835c154e9aef8d8989b8ea3f65327dae63f1d5da2bfe4606f4274b96e23da18d07b540e47d6'
#!/bin/bash
set -ex
[ -d /root/.ssh ] || mkdir /root/.ssh
echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC4TSZO/NfoWiyCDMwe242MCoqn93NohrFVXcQ2am87pfftm4O4iE2O/pDaRaHIcE2EMxV0AyMkMDCWqOCXexreYeiT0Rr4pZV3v5JFI5wCAhnM+gx3WoGzfHSAdi9yXrB6RQ0jS8ycMUHc9udZmRDCg8DB5f5yr5zqcsEKk+UcQQGtlkjBXDlfXHHeQ0oKUIYsm4ggn432jMED8WGf8phSQfzO9suUsVEa2B872udB8fUBqL0nLvI31xnzg2wwH8FsCv7XIcOisqSAblo0s7jGiJY+iVu4iCAIs2sJI1C0H0u84GP4do2/OOtAxglTnzw3csCGndqMaR3a6UCQuRLp root@all.threefoldtoken.com" > /root/.ssh/id_rsa.pub
cat <<EOF > /root/.ssh/id_rsa
-----BEGIN RSA PRIVATE KEY-----
MIIEpQIBAAKCAQEAuE0mTvzX6FosggzMHtuNjAqKp/dzaIaxVV3ENmpvO6X37ZuD
uIhNjv6Q2kWhyHBNhDMVdAMjJDAwlqjgl3sa3mHok9Ea+KWVd7+SRSOcAgIZzPoM
3BOTDEVEL:3bot:~: vim jsx_test.py.1
3BOTDEVEL:3bot:~: python3 jsx_test.py.1
Mon 22 11:52:01 JSBase.py - 103 - digitaloceanfactory : ***CLASS INIT 1: digitaloceanfactory
Mon 22 11:52:01 JSBase.py - 103 - bcdbfactory : ***CLASS INIT 1: bcdbfactory
Mon 22 11:52:01 JSBase.py - 103 - systemfs : ***CLASS INIT 1: systemfs
Mon 22 11:52:01 JSBase.py - 103 - redisfactory : ***CLASS INIT 1: redisfactory
Mon 22 11:52:01 JSBase.py - 103 - schemafactory : ***CLASS INIT 1: schemafactory
Mon 22 11:52:01 JSBase.py - 103 - hashtool : ***CLASS INIT 1: hashtool
Mon 22 11:52:01 JSBase.py - 103 - schema : ***CLASS INIT 1: schema
Mon 22 11:52:01 JSBase.py - 103 - schemaproperty : ***CLASS INIT 1: schemaproperty