Merge branch 'lash/fix-configs' into 'master'

Fix configs after cic-base remove merges

See merge request grassrootseconomics/cic-internal-integration!245
This commit is contained in:
Louis Holbrook 2021-08-17 16:52:17 +00:00
commit c84239c820
7 changed files with 25 additions and 21 deletions

View File

@ -10,6 +10,8 @@ celery==4.4.7
redis==3.5.3
chainsyncer[sql]>=0.0.6a1,<0.1.0
erc20-faucet>=0.2.4a2, <0.3.0
chainlib-eth>=0.0.7a3,<0.1.0
chainlib>=0.0.7a3,<0.1.0
#chainlib-eth==0.0.7a5,<0.1.0
chainlib-eth==0.0.7a5
#chainlib==0.0.7a4,<0.1.0
chainlib==0.0.7a4
eth-address-index>=0.1.4a1,<0.2.0

View File

@ -1,3 +1,3 @@
celery==4.4.7
chainlib-eth>=0.0.7a5,<0.1.0
chainlib-eth>=0.0.7a7,<0.1.0
semver==2.13.0

View File

@ -10,6 +10,7 @@ from alembic.config import Config as AlembicConfig
import confini
from cic_eth.db import dsn_from_config
import cic_eth.cli
logging.basicConfig(level=logging.WARNING)
logg = logging.getLogger()
@ -19,25 +20,20 @@ rootdir = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
dbdir = os.path.join(rootdir, 'cic_eth', 'db')
migrationsdir = os.path.join(dbdir, 'migrations')
config_dir = os.path.join('/usr/local/etc/cic-eth')
arg_flags = cic_eth.cli.argflag_std_base
argparser = argparse.ArgumentParser()
argparser.add_argument('-c', type=str, default=config_dir, help='config file')
argparser.add_argument('--env-prefix', default=os.environ.get('CONFINI_ENV_PREFIX'), dest='env_prefix', type=str, help='environment prefix for variables to overwrite configuration')
argparser = cic_eth.cli.ArgumentParser(arg_flags)
argparser.add_argument('--migrations-dir', dest='migrations_dir', default=migrationsdir, type=str, help='path to alembic migrations directory')
argparser.add_argument('--reset', action='store_true', help='downgrade before upgrading')
argparser.add_argument('-f', action='store_true', help='force action')
argparser.add_argument('-v', action='store_true', help='be verbose')
argparser.add_argument('-vv', action='store_true', help='be more verbose')
args = argparser.parse_args()
if args.vv:
logging.getLogger().setLevel(logging.DEBUG)
elif args.v:
logging.getLogger().setLevel(logging.INFO)
config = confini.Config(args.c, args.env_prefix)
config.process()
extra_args = {
'migrations_dir': None,
'reset': None,
'f': '_FORCE_ACTION',
}
config = cic_eth.cli.Config.from_args(args, arg_flags, 0, extra_args=extra_args)
config.censor('PASSWORD', 'DATABASE')
config.censor('PASSWORD', 'SSL')
logg.debug('config:\n{}'.format(config))

View File

@ -30,13 +30,14 @@ COPY requirements.txt .
ARG pip_index_url=https://pypi.org/simple
ARG EXTRA_INDEX_URL="https://pip.grassrootseconomics.net:8433"
ARG EXTRA_PIP_ARGS=""
ARG GITLAB_PYTHON_REGISTRY="https://gitlab.com/api/v4/projects/27624814/packages/pypi/simple"
ARG pip_trusted_host=pypi.org
RUN --mount=type=cache,mode=0755,target=/root/.cache/pip \
pip install --index-url https://pypi.org/simple \
--force-reinstall \
--trusted-host $pip_trusted_host \
--extra-index-url $GITLAB_PYTHON_REGISTRY --extra-index-url $EXTRA_INDEX_URL \
--extra-index-url $GITLAB_PYTHON_REGISTRY --extra-index-url $EXTRA_INDEX_URL $EXTRA_PIP_ARGS \
-r requirements.txt
COPY . .

View File

@ -1,10 +1,10 @@
cic-eth[tools]==0.12.2a4
eth-erc20>=0.0.12a1,<0.1.0
erc20-demurrage-token>=0.0.3a1,<0.1.0
erc20-demurrage-token>=0.0.3a4,<0.1.0
eth-address-index>=0.1.4a1,<0.2.0
eth-accounts-index>=0.0.14a1,<0.1.0
cic-eth-registry>=0.5.8a1,<0.6.0
erc20-faucet>=0.2.4a1,<0.3.0
erc20-transfer-authorization>=0.3.4a1,<0.4.0
sarafu-faucet>=0.0.5a5,<0.1.0
chainlib-eth>=0.0.7a1,<0.1.0
sarafu-faucet>=0.0.5a7,<0.1.0
chainlib-eth>=0.0.7a8,<0.1.0

View File

@ -99,11 +99,15 @@ if [[ -n "${ETH_PROVIDER}" ]]; then
>&2 echo -e "\033[;93mtoken sink address not set, so redistribution will be BURNED\033[;39m"
fi
fi
DEV_RESERVE_ADDRESS=`erc20-demurrage-token-deploy $gas_price_arg -p $ETH_PROVIDER -y $DEV_ETH_KEYSTORE_FILE -i $CIC_CHAIN_SPEC --name "$TOKEN_NAME" --symbol $TOKEN_SYMBOL -vv -ww`
export _CONFINI_DIR=$CONFINI_DIR
unset CONFINI_DIR
DEV_RESERVE_ADDRESS=`erc20-demurrage-token-deploy $fee_price_arg -p $ETH_PROVIDER -y $DEV_ETH_KEYSTORE_FILE -i $CIC_CHAIN_SPEC --name "$TOKEN_NAME" --symbol $TOKEN_SYMBOL -vv -ww -s`
export CONFINI_DIR=$_CONFINI_DIR
else
>&2 echo unknown token type $TOKEN_TYPE
exit 1
fi
echo "giftable-token-gift $gas_price_arg -p $ETH_PROVIDER -y $DEV_ETH_KEYSTORE_FILE -i $CIC_CHAIN_SPEC -vv -w -a $DEV_RESERVE_ADDRESS $DEV_RESERVE_AMOUNT"
giftable-token-gift $gas_price_arg -p $ETH_PROVIDER -y $DEV_ETH_KEYSTORE_FILE -i $CIC_CHAIN_SPEC -vv -w -a $DEV_RESERVE_ADDRESS $DEV_RESERVE_AMOUNT
>&2 echo "deploy account index contract"

View File

@ -80,6 +80,7 @@ services:
pip_index_url: ${PIP_DEFAULT_INDEX_URL:-https://pypi.org/simple}
pip_extra_args: $PIP_EXTRA_ARGS
EXTRA_INDEX_URL: ${EXTRA_INDEX_URL:-https://pip.grassrootseconomics.net:8433}
EXTRA_PIP_ARGS: $EXTRA_PIP_ARGS
# image: registry.gitlab.com/grassrootseconomics/cic-internal-integration/contract-migration:latest
environment:
CIC_REGISTRY_ADDRESS: $CIC_REGISTRY_ADDRESS