Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions modules/apim/templates/carbon-home/bin/api-manager.sh.erb
Original file line number Diff line number Diff line change
Expand Up @@ -257,16 +257,28 @@ fi
for f in "$CARBON_HOME"/bin/*.jar
do
if [ "$f" != "$CARBON_HOME/bin/*.jar" ];then
CARBON_CLASSPATH="$CARBON_CLASSPATH":$f
if [ -n "$CARBON_CLASSPATH" ]; then
CARBON_CLASSPATH="$CARBON_CLASSPATH:$f"
else
CARBON_CLASSPATH="$f"
fi
fi
done
for t in "$CARBON_HOME"/lib/*.jar
do
CARBON_CLASSPATH="$CARBON_CLASSPATH":$t
if [ -n "$CARBON_CLASSPATH" ]; then
CARBON_CLASSPATH="$CARBON_CLASSPATH:$t"
else
CARBON_CLASSPATH="$t"
fi
done
for t in "$CARBON_HOME"/lib/endorsed/*.jar
do
CARBON_CLASSPATH="$CARBON_CLASSPATH":$t
if [ -n "$CARBON_CLASSPATH" ]; then
CARBON_CLASSPATH="$CARBON_CLASSPATH:$t"
else
CARBON_CLASSPATH="$t"
fi
done


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ key_password = "<%= @key_store_key_password %>"
#alias = "wso2carbon"
#key_password = "wso2carbon"

[apim]
gateway_type = "Regular,APK,AWS"

<% @gateway_environments.each do |environment| %>
[[apim.gateway.environment]]
name = "<%= environment['name'] %>"
Expand Down Expand Up @@ -117,7 +120,7 @@ token = <%= @ai_token %>
endpoint = <%= @ai_endpoint %>

[apim.key_manager]
enable_apikey_subscription_validation = true
enable_lightweight_apikey_generation = true
service_url = "<%= @key_manager_server_url %>"
#username = "$ref{super_admin.username}"
#password = "$ref{super_admin.password}"
Expand All @@ -143,6 +146,7 @@ service_url = "<%= @key_manager_server_url %>"
#signing_algorithm = "SHA256withRSA"
#enable_user_claims = true
#claims_extractor_impl = "org.wso2.carbon.apimgt.impl.token.ExtendedDefaultClaimsRetriever"
#use_sha256_hash = false

[apim.oauth_config]
#enable_outbound_auth_header = false
Expand All @@ -166,6 +170,9 @@ url = "<%= @api_devportal_url %>"
#enable_cross_tenant_subscriptions = true
#default_reserved_username = "apim_reserved_user"

#[apim.publisher]
#enable_portal_configuration_only_mode = false

[apim.cors]
allow_origins = "*"
allow_methods = ["GET","PUT","POST","DELETE","PATCH","OPTIONS"]
Expand Down Expand Up @@ -236,7 +243,7 @@ allow_credentials = false
#enable_authentication = true

#[apim.token.revocation]
#notifier_impl = "org.wso2.carbon.apimgt.keymgt.events.TokenRevocationNotifierImpl"
#notifier_impl = "org.wso2.carbon.apimgt.notification.TokenRevocationNotifierImpl"
#enable_realtime_notifier = true
#realtime_notifier.ttl = 5000
#enable_persistent_notifier = true
Expand Down
2 changes: 1 addition & 1 deletion modules/apim_common/manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
class apim_common::params {

$packages = ["unzip"]
$version = "4.3.0"
$version = "4.5.0"

# Set the location the product packages should reside in (eg: "local" in the /files directory, "remote" in a remote location)
$pack_location = "local"
Expand Down
7 changes: 1 addition & 6 deletions modules/apim_control_plane/manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@

include apim_common

# Optimize for profile
exec { "optimize-profile":
command => "/bin/sh ${carbon_home}/bin/profileSetup.sh -Dprofile=control-plane",
}

# Copy configuration changes to the installed directory
$template_list.each |String $template| {
file { "${carbon_home}/${template}":
Expand Down Expand Up @@ -61,7 +56,7 @@
}
}

# Copy api-manager.sh to installed directory
# Copy api-cp.sh to installed directory
file { "${carbon_home}/${start_script_template}":
ensure => file,
owner => $user,
Expand Down
2 changes: 1 addition & 1 deletion modules/apim_control_plane/manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# This class includes all the necessary parameters.
class apim_control_plane::params inherits apim_common::params {

$start_script_template = 'bin/api-manager.sh'
$start_script_template = 'bin/api-cp.sh'
$jvmxms = '256m'
$jvmxmx = '1024m'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ elif [ "$CMD" = "start" ]; then
fi
export CARBON_HOME="$CARBON_HOME"
# using nohup sh to avoid erros in solaris OS.TODO
nohup sh "$CARBON_HOME"/bin/api-manager.sh $args > /dev/null 2>&1 &
nohup sh "$CARBON_HOME"/bin/api-cp.sh $args > /dev/null 2>&1 &
exit 0
elif [ "$CMD" = "stop" ]; then
export CARBON_HOME="$CARBON_HOME"
Expand All @@ -223,7 +223,7 @@ elif [ "$CMD" = "restart" ]; then
done

# using nohup sh to avoid erros in solaris OS.TODO
nohup sh "$CARBON_HOME"/bin/api-manager.sh $args > /dev/null 2>&1 &
nohup sh "$CARBON_HOME"/bin/api-cp.sh $args > /dev/null 2>&1 &
exit 0
elif [ "$CMD" = "test" ]; then
JAVACMD="exec "$JAVACMD""
Expand Down Expand Up @@ -257,16 +257,28 @@ fi
for f in "$CARBON_HOME"/bin/*.jar
do
if [ "$f" != "$CARBON_HOME/bin/*.jar" ];then
CARBON_CLASSPATH="$CARBON_CLASSPATH":$f
if [ -n "$CARBON_CLASSPATH" ]; then
CARBON_CLASSPATH="$CARBON_CLASSPATH:$f"
else
CARBON_CLASSPATH="$f"
fi
fi
done
for t in "$CARBON_HOME"/lib/*.jar
do
CARBON_CLASSPATH="$CARBON_CLASSPATH":$t
if [ -n "$CARBON_CLASSPATH" ]; then
CARBON_CLASSPATH="$CARBON_CLASSPATH:$t"
else
CARBON_CLASSPATH="$t"
fi
done
for t in "$CARBON_HOME"/lib/endorsed/*.jar
do
CARBON_CLASSPATH="$CARBON_CLASSPATH":$t
if [ -n "$CARBON_CLASSPATH" ]; then
CARBON_CLASSPATH="$CARBON_CLASSPATH:$t"
else
CARBON_CLASSPATH="$t"
fi
done


Expand Down
7 changes: 1 addition & 6 deletions modules/apim_gateway/manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@

include apim_common

# Optimize for profile
exec { "optimize-profile":
command => "/bin/sh ${carbon_home}/bin/profileSetup.sh -Dprofile=gateway-worker",
}

# Copy configuration changes to the installed directory
$template_list.each |String $template| {
file { "${carbon_home}/${template}":
Expand Down Expand Up @@ -61,7 +56,7 @@
}
}

# Copy api-manager.sh to installed directory
# Copy gateway.sh to installed directory
file { "${carbon_home}/${start_script_template}":
ensure => file,
owner => $user,
Expand Down
2 changes: 1 addition & 1 deletion modules/apim_gateway/manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# This class includes all the necessary parameters.
class apim_gateway::params inherits apim_common::params {

$start_script_template = 'bin/api-manager.sh'
$start_script_template = 'bin/gateway.sh'
$jvmxms = '256m'
$jvmxmx = '1024m'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,28 +157,6 @@ do
CMD="restart"
elif [ "$c" = "--test" ] || [ "$c" = "-test" ] || [ "$c" = "test" ]; then
CMD="test"
elif [ "$c" = "--optimize" ] || [ "$c" = "-optimize" ] || [ "$c" = "optimize" ]; then
for option in $*; do
if [ "$option" = "--skipConfigOptimization" ] || [ "$option" = "-skipConfigOptimization" ] ||
[ "$option" = "skipConfigOptimization" ]; then
passedSkipConfigOptimizationOption=true
echo "Passed skipConfigOptimization Option: $passedSkipConfigOptimizationOption"
fi
done

for profile in $*; do
case "$profile" in
*Dprofile=*)
cd $(dirname "$0")
if [ "$passedSkipConfigOptimizationOption" = true ]; then
sh profileSetup.sh $profile --skipConfigOptimization
else
sh profileSetup.sh $profile
fi
echo "Starting the server..."
;;
esac
done
else
args="$args $c"
fi
Expand All @@ -204,7 +182,7 @@ elif [ "$CMD" = "start" ]; then
fi
export CARBON_HOME="$CARBON_HOME"
# using nohup sh to avoid erros in solaris OS.TODO
nohup sh "$CARBON_HOME"/bin/api-manager.sh $args > /dev/null 2>&1 &
nohup sh "$CARBON_HOME"/bin/gateway.sh $args > /dev/null 2>&1 &
exit 0
elif [ "$CMD" = "stop" ]; then
export CARBON_HOME="$CARBON_HOME"
Expand All @@ -223,7 +201,7 @@ elif [ "$CMD" = "restart" ]; then
done

# using nohup sh to avoid erros in solaris OS.TODO
nohup sh "$CARBON_HOME"/bin/api-manager.sh $args > /dev/null 2>&1 &
nohup sh "$CARBON_HOME"/bin/gateway.sh $args > /dev/null 2>&1 &
exit 0
elif [ "$CMD" = "test" ]; then
JAVACMD="exec "$JAVACMD""
Expand Down Expand Up @@ -257,16 +235,28 @@ fi
for f in "$CARBON_HOME"/bin/*.jar
do
if [ "$f" != "$CARBON_HOME/bin/*.jar" ];then
CARBON_CLASSPATH="$CARBON_CLASSPATH":$f
if [ -n "$CARBON_CLASSPATH" ]; then
CARBON_CLASSPATH="$CARBON_CLASSPATH:$f"
else
CARBON_CLASSPATH="$f"
fi
fi
done
for t in "$CARBON_HOME"/lib/*.jar
do
CARBON_CLASSPATH="$CARBON_CLASSPATH":$t
if [ -n "$CARBON_CLASSPATH" ]; then
CARBON_CLASSPATH="$CARBON_CLASSPATH:$t"
else
CARBON_CLASSPATH="$t"
fi
done
for t in "$CARBON_HOME"/lib/endorsed/*.jar
do
CARBON_CLASSPATH="$CARBON_CLASSPATH":$t
if [ -n "$CARBON_CLASSPATH" ]; then
CARBON_CLASSPATH="$CARBON_CLASSPATH:$t"
else
CARBON_CLASSPATH="$t"
fi
done


Expand Down
7 changes: 1 addition & 6 deletions modules/apim_tm/manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@

include apim_common

# Optimize for profile
exec { "optimize-profile":
command => "/bin/sh ${carbon_home}/bin/profileSetup.sh -Dprofile=traffic-manager",
}

# Copy configuration changes to the installed directory
$template_list.each |String $template| {
file { "${carbon_home}/${template}":
Expand Down Expand Up @@ -61,7 +56,7 @@
}
}

# Copy api-manager.sh to installed directory
# Copy traffic-manager.sh to installed directory
file { "${carbon_home}/${start_script_template}":
ensure => file,
owner => $user,
Expand Down
2 changes: 1 addition & 1 deletion modules/apim_tm/manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# This class includes all the necessary parameters.
class apim_tm::params inherits apim_common::params {

$start_script_template = 'bin/api-manager.sh'
$start_script_template = 'bin/traffic-manager.sh'
$jvmxms = '256m'
$jvmxmx = '1024m'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,28 +157,6 @@ do
CMD="restart"
elif [ "$c" = "--test" ] || [ "$c" = "-test" ] || [ "$c" = "test" ]; then
CMD="test"
elif [ "$c" = "--optimize" ] || [ "$c" = "-optimize" ] || [ "$c" = "optimize" ]; then
for option in $*; do
if [ "$option" = "--skipConfigOptimization" ] || [ "$option" = "-skipConfigOptimization" ] ||
[ "$option" = "skipConfigOptimization" ]; then
passedSkipConfigOptimizationOption=true
echo "Passed skipConfigOptimization Option: $passedSkipConfigOptimizationOption"
fi
done

for profile in $*; do
case "$profile" in
*Dprofile=*)
cd $(dirname "$0")
if [ "$passedSkipConfigOptimizationOption" = true ]; then
sh profileSetup.sh $profile --skipConfigOptimization
else
sh profileSetup.sh $profile
fi
echo "Starting the server..."
;;
esac
done
else
args="$args $c"
fi
Expand All @@ -204,7 +182,7 @@ elif [ "$CMD" = "start" ]; then
fi
export CARBON_HOME="$CARBON_HOME"
# using nohup sh to avoid erros in solaris OS.TODO
nohup sh "$CARBON_HOME"/bin/api-manager.sh $args > /dev/null 2>&1 &
nohup sh "$CARBON_HOME"/bin/traffic-manager.sh $args > /dev/null 2>&1 &
exit 0
elif [ "$CMD" = "stop" ]; then
export CARBON_HOME="$CARBON_HOME"
Expand All @@ -223,7 +201,7 @@ elif [ "$CMD" = "restart" ]; then
done

# using nohup sh to avoid erros in solaris OS.TODO
nohup sh "$CARBON_HOME"/bin/api-manager.sh $args > /dev/null 2>&1 &
nohup sh "$CARBON_HOME"/bin/traffic-manager.sh $args > /dev/null 2>&1 &
exit 0
elif [ "$CMD" = "test" ]; then
JAVACMD="exec "$JAVACMD""
Expand Down Expand Up @@ -257,16 +235,28 @@ fi
for f in "$CARBON_HOME"/bin/*.jar
do
if [ "$f" != "$CARBON_HOME/bin/*.jar" ];then
CARBON_CLASSPATH="$CARBON_CLASSPATH":$f
if [ -n "$CARBON_CLASSPATH" ]; then
CARBON_CLASSPATH="$CARBON_CLASSPATH:$f"
else
CARBON_CLASSPATH="$f"
fi
fi
done
for t in "$CARBON_HOME"/lib/*.jar
do
CARBON_CLASSPATH="$CARBON_CLASSPATH":$t
if [ -n "$CARBON_CLASSPATH" ]; then
CARBON_CLASSPATH="$CARBON_CLASSPATH:$t"
else
CARBON_CLASSPATH="$t"
fi
done
for t in "$CARBON_HOME"/lib/endorsed/*.jar
do
CARBON_CLASSPATH="$CARBON_CLASSPATH":$t
if [ -n "$CARBON_CLASSPATH" ]; then
CARBON_CLASSPATH="$CARBON_CLASSPATH:$t"
else
CARBON_CLASSPATH="$t"
fi
done


Expand Down